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
Cannot plot contour
s in both CairoMakie and GLMakie
#3060
Comments
AssertionError: length(positions) == length(colors)
when animating contour
scontour
s
Are you sure it works fine with GLMakie? I tried it and even though it generates the video, the contours that it shows are wrong in my case except in the first frame. |
I hadn't visually checked the output of GLMakie but I guess you're right. Here's what I get for GLMakie with a heatmap as a background: using GLMakie
fig = Figure()
n = Observable(1)
ax = Axis(fig[1, 1])
N = 10
A = randn(N, N, N)
Aₙ = @lift A[:,:,$n]
heatmap!(ax, Aₙ)
contour!(ax, Aₙ)
frames = 1:N
record(fig, "mwe.mp4", frames, framerate=4) do frame
@info "Plotting frame $frame..."
n[] = frame
end mwe.mp4So it looks like the I'm gonna change the title. This seems like kind of a serious bug, I'm surprised that this isn't being reported by anyone else. |
contour
scontour
s in both CairoMakie and GLMakie
@SimonDanisch are we missing something here? I'm thinking it's weird @aquirosr and I are the only reporting this bug, so maybe the issue is on our end? |
Probably an uncaught regression, maybe related to the addition of contour labels (at least I think it has worked before). We don't yet test updating of observables for all plot types, which is how this must have gone through. |
I've been doing some tests and this worked up to v0.19.4, included. |
GLMakie works fine for me on master. Maybe the heatmap is making it hard to see changes? |
I only plotted the mwe.mp4This was also done on |
Yeah, this is a bug... The line plot observable in |
When using
CairoMakie
to animate contours, I get the following error:I posted this on slack a while ago but couldn't solve the issue, so I've decided to post here this time. I also remember someone online somewhere with the same issue as me and no solution, but I can't find that anymore.
Here's the MWE to reproduce this:
PS: The error doesn't happen in GLMakie, only usingo CairoMakie. Also for some reason the error seems to happen only in the second frame (i.e. the first frame plots fine), but when I manually try to plot (not animate) the first frame after the fact I get the same error:
]activate --temp; add Makie
)Here's the full error output:
The text was updated successfully, but these errors were encountered: