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.
Description
This is effectively #4150 for CairoMakie. The problems I'm trying to solve in that pr are:
Since there is no interactive adding of scene to the CairoMakie screen, Problem (1) doesn't apply here. Problem (2) is fairly easily fixed by just drawing scene-by-scene and only clearing the currently picked scene. This change is implemented here.
I added a refimg test that highlights these issues. For CairoMakie:
For reference this is what the other backends produce: (#4150 reproduces CairoMakie after, but AA is broken iirc)
The lack of z sorting across multiple scenes breaks a bunch of assumptions made in MakieLayout. This includes:
Most of these issues could be fixed by adding an overlay scene and moving the respective plots there. Some cases, like the PolarAxis grid would be more complicated. Currently the grid can be moved behind or in front of plots, which would require moving the grid from a background scene to a foreground scene or vice versa.
Perhaps a better, less breaking option would be to "merge" scenes with
clear = false
. I the currently renderedclear = true
scene has children withclear = false
, consider all their plots part of the current scene, sorting them like we would now. (I think this would also be a good optimization for GLMakie if we don't want to rely on stencil buffers.)This pr is currently more for testing plans/discussion/getting a CI run to look at. Maybe it gets to a point where we consider CairoMakie correct without breaking other backends, and maybe we can merge this then. Getting the other backends to match will take more effort I think.
Type of change
Delete options that do not apply:
Checklist