feat(plotting): Makie backend parity + flatten ext/case - #411
Merged
Merged
Conversation
Wire the now-at-parity CTBase Makie backend through the CTModels case layer, and fold the vestigial ext/case/ directory away. - ext/case/plot.jl → ext/CTModelsPlots.jl: the shared "case" directory dated from when the case layer lived in ext/; it now lives in src/PlotCase, so the file is just the Plots plumbing. All four extensions are now flat single files (matches CTModelsJLD / CTModelsJSON and the CTSolvers convention). - ext/CTModelsMakie.jl: `Makie.plot!` now works — `_plot!` mirrors the Plots `_plot!`, with `plot!(::Makie.Figure, sol, …)` and `plot!(sol, …)` targeting `Makie.current_figure()`. The proof-of-concept caveats are dropped from the docstrings. - test/suite/extensions/test_plot_makie.jl: expanded to mirror test_plot_reference.jl (description subsets, control modes, style :none, decoration toggles, user styles, overlay, free-final-time), plus structural checks that Stairs / HLines / VLines reach the axes. - docs: CairoMakie docs dep; make.jl loads it and picks up the CTModelsMakie extension; the plotting guide's Makie section is now executed `@example`s including an overlay; index.md and api_reference.jl updated. Needs control-toolbox/CTBase.jl#540 merged + released before CI is green. Closes #408. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
7 tasks
Mirror of Plots.plot(; size=…): Makie has no zero-argument plot of its own, so the Plots-style workflow `f = plot(; size=…); plot!(f, sol)` had no Makie equivalent. Add `Makie.plot(; kwargs...) = Makie.Figure(; kwargs...)` so a blank sized figure can be created and overlaid onto. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
serialization/plotting.md and index.md already had a Makie section/bullet; serialization/overview.md and model/display.md still listed only CTModelsPlots / Plots.plot. Add the CTModelsMakie row, update the dependency diagram and reading-order table, and point plotting.md at the CTBase "User Attributes: Series vs Axis" guide for the per-backend kwarg rules. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
Author
Updates since the PR was opened
Note the label/legend regression on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #408. Depends on control-toolbox/CTBase.jl#540 (the CTBase Makie backend must merge + release before CI here is green).
Makie parity
ext/CTModelsMakie.jl—Makie.plot!now works._plot!mirrors the Plots_plot!; surface isplot!(::Makie.Figure, sol, …)andplot!(sol, …)→Makie.current_figure()(created if none). Empty-figure fill is handled in CTBase'srender!. A zero-argMakie.plot(; kwargs...)shim (ad51844b) mirrorsPlots.plot(; size=…)for thef = plot(; size=…); plot!(f, sol)workflow. Proof-of-concept caveats removed from the docstrings.test/suite/extensions/test_plot_makie.jl— expanded from the POC subset to the fulltest_plot_reference.jlmatrix (description subsets, control modes,*_style=:none, decoration toggles, user styles, overlay, free final time, empty canvas), plus structural assertions thatStairs/HLines/VLinesplot objects reach the axes.Flatten
ext/case/ext/case/dated from when the plotting case layer lived underext/. It now lives insrc/PlotCase, soext/case/plot.jlwas only the Plots plumbing. Folded intoext/CTModelsPlots.jl;ext/case/deleted. All four extensions are now flat single files — consistent withCTModelsJLD/CTModelsJSONand the CTSolvers convention. Behaviour-preserving (the Plots reference matrix is unchanged and green).Docs
CairoMakiedocs dependency;make.jlloads it and picks up theCTModelsMakieextension; the plotting guide's Makie section is now executed@examples including aplot!overlay;index.mdbullet andapi_reference.jlpath updated. A follow-up docs pass (5b205997) names the Makie backend inserialization/overview.mdandmodel/display.mdand cross-links the CTBase "User Attributes: Series vs Axis" guide.Testing (against the CTBase branch, dev-linked locally)
Last full local run 2026-08-28 (
5b205997):test_plot_makie.jl/test_plot_reference.jl— greenNote: the
:splitlabel/legend regression was fixed on the CTBase side (control-toolbox/CTBase.jl#540,control-toolbox/CTBase.jl@1a2624f), not here.🤖 Generated with Claude Code