Repository navigation
Makie.jl plotting extension, deprecate Plots.jl recipes - #428
Conversation
lkdvos
left a comment
There was a problem hiding this comment.
This definitely looks great!
I have a couple questions, mostly since it has been a while since I looked at Makie:
Do you know if the other attributes can still be set/changed? For example, what happens if I want to override the default title/ticks/...?
I seem to recall also that there was some system with observables etc, where various parts where dynamically recalculated. Do you know if this is still relevant?
|
I don't understand the current aqua test failing. It seems to be complaining about missing compat bounds for every package under extras of the main project.toml (but are specified in the test project.toml), but this previously wasn't failing. |
Codecov Report❌ Patch coverage is
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Okay, I finally managed to look into this again. I'm happy with how things are in terms of being able to use these backends with some customisation. What remains is some stylistic decisions. In particular, I don't know how useful it is to plot transfer matrix spectra the way we are now. These phases don't matter in many cases, so if we allow some toggle to not plot them, there's then a way to plot the different sectors next to each other, similar to the current entanglement plots. Some other style choices are in todos, though I'm sure there are many more. |
- `entanglement_plot(!)` and `transfer_plot(!)`: Makie recipes in a new `MPSKitMakieExt`, extending stubs defined in MPSKit. Axis defaults come from `preferred_axis_attributes` (overridable through `axis = (; ...)`), mutating calls leave the target axis untouched unless `use_axis_hints = true`, and `axislegend(ax)` lists the sectors. - `entanglementplot` and `transferplot` move to `MPSKitPlotsExt` with RecipesBase as a weak dependency, and are deprecated. Distinct names keep both backends usable in one session. - Fix the angle shift for a nonzero `thetaorigin`. Squashed from bd/plotting (#428). Co-Authored-By: lkdvos <ldevos98@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use `entanglement_plot`/`transfer_plot` with CairoMakie in the xxz-heisenberg and haldane-spt examples, and regenerate their pages. Makie embeds figures as `base64, <data>`, so the figure externalization now allows whitespace after the comma. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The weakdep compat in the main Project.toml already bounds Makie, and the tests reach it through CairoMakie. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…plot Carried over from 0418d74 on the previous branch history. Co-Authored-By: lkdvos <ldevos98@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop Plots (and LaTeXStrings) from the examples and docs environments, port the remaining examples' figures to Makie, and regenerate every example page. `make.jl` now resets the Makie theme between examples, and the excitation plots show every branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
entanglementplot and transferplot to Makie.jl|
@borisdevos I made an attempt at reviving this, but could use some of your opinions. One of the important issues I found with the previous approach is that both the Plots as well as the Makie implementations were writing into the defined |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I can take a closer look at this tomorrow or Friday if you want, I'm mostly just curious about how the output actually looks like. Though the code looks a lot cleaner! In terms of the API I have no strong opinion, I had always just assumed users would never load multiple plot backends at the same time, but the |
|
No rush about this, I think the output is shown in some of the examples mostly, so that might give an idea? It's not super urgent, i think we can also still swap stuff around afterwards if we're happy with the function names as well |
borisdevos
left a comment
There was a problem hiding this comment.
I'm a fan of the plots! The only nitpick I have is that I think the entanglement spectra y-tick labels should be integer powers. Like in the spin-1 Heisenberg example, the psi_minus plot has 10^{0.0}, 10^{-2.5} and 10^{-5.0}. Makie just picks these based on the y-limit. But this is really nitpicky, feel free to ignore.
In general I think stylistic choices can be altered later. I can't approve, but the code is fine by me.
|
I guess that would still be configurable by setting |


Deals with #249: Makie.jl support for the entanglement and transfer spectrum plots, and deprecation of the Plots.jl recipes.
Makie:
entanglement_plotandtransfer_plotMPSKitMakieExtis loaded with any Makie backend (e.g.using CairoMakie). It providesentanglement_plot,transfer_plotand their mutating!versions as ordinary Makie recipes, following Makie's guidance for recipes in package extensions:Makie.preferred_axis_attributesinstead of editing the current axis. Override them with Makie's usualaxis = (; title = "...").!calls leave the target axis alone unlessuse_axis_hints = trueis passed.axislegend(ax)lists the sectors.Plots: deprecated
The Plots.jl recipes
entanglementplotandtransferplotnow live inMPSKitPlotsExt, with RecipesBase as a weak dependency, and print a deprecation warning. They keep their previous behaviour. The Makie functions have different names, so both backends can be loaded in one session; previously each extension silently overwrote the other's methods, depending on load order.Other changes
MPSKit.entanglement_plot_data,MPSKit.transfer_plot_data, unexported), so the two extensions only handle drawing and styling.thetaoriginin the transfer spectrum, which moved eigenvalues outside the plotted range (both backends).examples/figure_externalization.jlalso accepts Makie'sbase64,data URIs, so figures are written to files instead of being embedded in the page.Note on history
The branch was squashed onto
main(author kept as @borisdevos). The:axis_info-node rework from 2026-09-18 is superseded by thepreferred_axis_attributesapproach above; its vanishing-Schmidt-value warning has been carried over. The previous history is kept locally onbd/plotting-backup.🤖 Generated with Claude Code