-
-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Old axis labels showing up in new Figure with SVG in CairoMakie #952
Comments
We switched the default to PNG because of this: As far I can tell, there isn't much we can do on the Makie side of things... |
The problem is that Documenter's tagged version puts svgs directly into the page. This causes them to interact which each other because glyph ids are shared among them. The fix is to use svgs in I fixed this issue on Documenter#master, which is what our docs currently build with until a new version is tagged. |
Is there a way to get different glyph ids? Pass a UUID or the like when constructing the SVG object? |
I guess we could look for |
the other issue with directly embedded svgs is that they don't resize, so I find the |
I'm thinking more as a stop-gap until Documenter has a new release (besides just using PNG) |
maybe we should do this anyway if it messes up other tools as well, like jupyter notebooks |
Oh it does mess Jupyter notebooks :) I was going to file an issue about this after doing some research. I'll write my results here:
For Jupyter the # For plots shown as return value
IJulia.metadata(::AbstractPlotting.Figure) = Dict("isolated" => true)
# For plots shown by calling `display` explicitely
IJulia.metadata(::AbstractPlotting.Scene) = Dict("isolated" => true)
# For AlgebraOfGraphics plots shown by return value
IJulia.metadata(::AlgebraOfGraphics.FigureGrid) = Dict("isolated" => true) So there are at least the following options:
|
I think I'll follow the matplotlib approach and replace the ids with salted versions, created with the shortened hash of the full svg. This means that the same file will have the same salt when reproducing figures. |
fixed by JuliaPlots/CairoMakie.jl#163 |
When plotting successive figures to SVG with CairoMakie, the previous figures linger and contaminate the new figure. This is visible in a recent docs preview in MixedModelsMakie. The first plot renders correctly, but the second and third plots have clear problems with overprinting in the y-axis labels. Likewise, the final plot, which is completely distinct clearly has some overplotted axis labels from the first three plots.
This problem does not occur with PNG output.
cc @dmbates
The text was updated successfully, but these errors were encountered: