I think I found a very specific rendering bug when using CairoMakie and Julia Notebooks.
Running the following code in successive notebook cells produces the rendering error in the second plot. The orange line in the second plot doesn’t fully render above some limit.
using CairoMakie CairoMakie.activate!(type="svg") f = Figure() Axis(f[1,1], title="First Plot - no error") lines!(randn(10).+10) lines!(randn(10), linewidth=2) f
f = Figure() Axis(f[1,1], title="Second Plot - rendering error") lines!(randn(10)) lines!(randn(10), linewidth=2) f
Note that the above images are screenshots of the editor (VSCode). When I export the plot or even use the plot viewer, the plots are correctly rendered.
Some other things that appear to ‘fix’ the problem:
linewidth=1for either plot. Linewidths greater than 1 seem to cause this bug.
.+10from the first
lines!call, which reduces the y-axis range to be the same as the second plot.
- Using GLMakie, or using CairoMakie in “png” mode.
Weirdly, if I make one of the above changes to the first cell, the second plot corrects itself automatically.
Any ideas on what’s going on?