Skip to content

feat(plotting): Makie backend parity + flatten ext/case - #411

Merged
ocots merged 3 commits into
mainfrom
feat/makie-backend-parity
Aug 28, 2026
Merged

ocots merged 3 commits into
mainfrom
feat/makie-backend-parity

Conversation

@ocots

@ocots ocots commented Aug 28, 2026 •

Copy link
Copy Markdown
Member

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 is plot!(::Makie.Figure, sol, …) and plot!(sol, …) → Makie.current_figure() (created if none). Empty-figure fill is handled in CTBase's render!. A zero-arg Makie.plot(; kwargs...) shim (ad51844b) mirrors Plots.plot(; size=…) for the f = 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 full test_plot_reference.jl matrix (description subsets, control modes, *_style=:none, decoration toggles, user styles, overlay, free final time, empty canvas), plus structural assertions that Stairs / HLines / VLines plot objects reach the axes.

Flatten ext/case/

ext/case/ dated from when the plotting case layer lived under ext/. It now lives in src/PlotCase, so ext/case/plot.jl was only the Plots plumbing. Folded into ext/CTModelsPlots.jl; ext/case/ deleted. All four extensions are now flat single files — consistent with CTModelsJLD / CTModelsJSON and the CTSolvers convention. Behaviour-preserving (the Plots reference matrix is unchanged and green).

Docs

CairoMakie docs dependency; make.jl loads it and picks up the CTModelsMakie extension; the plotting guide's Makie section is now executed @examples including a plot! overlay; index.md bullet and api_reference.jl path updated. A follow-up docs pass (5b205997) names the Makie backend in serialization/overview.md and model/display.md and 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 — green
  • full suite — 75482 pass
  • docs — clean

Note: the :split label/legend regression was fixed on the CTBase side (control-toolbox/CTBase.jl#540, control-toolbox/CTBase.jl@1a2624f), not here.

🤖 Generated with Claude Code

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>
ocots and others added 2 commits August 28, 2026 15:51
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>
@ocots ocots added run ci Trigger the CI workflow on this PR run documentation Trigger the Documentation workflow on this PR labels Aug 28, 2026
@ocots

ocots commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

Updates since the PR was opened

  • ad51844b feat(plotting): add zero-arg Makie.plot(; kwargs...) empty-canvas shim — Makie has no zero-argument plot, so the Plots-style workflow f = plot(; size=…); plot!(f, sol) had no Makie equivalent. Makie.plot(; kwargs...) = Makie.Figure(; kwargs...). Targeted tests 77, full suite 75482 pass.
  • 5b205997 docs: name the Makie backend in the extension/plotting overview pages — serialization/overview.md (extensions table, dependency diagram, reading-order table) and model/display.md still listed only CTModelsPlots / Plots.plot; added the CTModelsMakie row and pointed serialization/plotting.md at the CTBase "User Attributes: Series vs Axis" guide for the per-backend kwarg rules. Docs build clean.

Note the label/legend regression on :split was fixed on the CTBase side (control-toolbox/CTBase.jl#540 1a2624f), not here.

@ocots ocots closed this Aug 28, 2026
@ocots ocots reopened this Aug 28, 2026
@ocots
ocots merged commit daec7bc into main Aug 28, 2026
19 of 26 checks passed
@ocots
ocots deleted the feat/makie-backend-parity branch August 28, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run ci Trigger the CI workflow on this PR run documentation Trigger the Documentation workflow on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Roadmap] Makie backend — parity with the Plots backend

1 participant