Makie.jl
Makie.jl copied to clipboard
scatterlines! color does not cycle if different number of data points
- [X] are you running newest version (version from docs) ? GLMakie v0.9.8
- [X] can you reproduce the bug with a fresh environment ? (
]activate --temp; add Makie
) Same behavior - [X] What platform + GPU are you on? Windows 11 with Nvidia GeForce RTX 2060
I would expect each of these lines to have a different color. It used to work that way, and lines!
does work that way.
using GLMakie
fig = Figure()
axis = Axis(fig[1,1])
scatterlines!(axis, 0:1, 1:2, label="A")
scatterlines!(axis, 0:0.1:1, 2:0.1:3, label="B")
scatterlines!(axis, 0:1, 3:4, label="C")
Legend(fig[1,2], axis, "Label")
display(fig)
using GLMakie
fig = Figure()
axis = Axis(fig[1,1])
lines!(axis, 0:1, 1:2, label="A")
lines!(axis, 0:0.1:1, 2:0.1:3, label="B")
lines!(axis, 0:1, 3:4, label="C")
Legend(fig[1,2], axis, "Label")
display(fig)
I can't replicate this on master (i.e., it works as expected) but I can on the latest version as you said @nathanrboyer.
The only thing which touched scatterlines
since the last release was https://github.com/MakieOrg/Makie.jl/pull/3603, and running that code does indeed solve the issue:
You need to run
Makie.conversion_trait(::Type{<: ScatterLines}) = PointBased()
although I am not entirely sure why this would fix a theming issue. Maybe because cycling was only enabled for point-based plots?