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
Size of arguments calling poly #1514
Comments
Hm, guess strokecolor isn't handled correctly by the multi poly recipe... |
I think at this line one would need to check for number of poly elements and then adapt the color accordingly: |
Not sure it is a related issue. using Makie, GLMakie
y, z, sizes = rand(10), rand(10), 30 * rand(10)
f = Figure()
Axis(f[1, 1])
scatter!(y, z, markersize = sizes, marker = :circle)
ERROR: UndefVarError: x not defined
Stacktrace:
[1] (::GLMakie.GLVisualize.var"#51#52"{Vec{2, Float32}})(xs::Vec{2, Float32})
@ GLMakie.GLVisualize $HOME/.julia/packages/GLMakie/oDJ8D/src/GLVisualize/visualize/particles.jl:292
[2] iterate
@ ./generator.jl:47 [inlined]
[3] _collect(c::Vector{Vec{2, Float32}}, itr::Base.Generator{Vector{Vec{2, Float32}}, GLMakie.GLVisualize.var"#51#52"{Vec{2, Float32}}}, #unused#::Base.EltypeUnknown, isz::Base.HasShape{1})
@ Base ./array.jl:744
[4] collect_similar
... Sorry not to be able to investigate further, thanks. |
It seems that this line should be replaced by map(x -> f * x, xs) |
Btw, the original problem does not seem to be resolved in Makie 0.16.1 using GeometryBasics, GLMakie
f = Figure(); Axis(f[1, 1])
P = [Polygon([Point2(rand(), rand()) for _ = 1:3]) for k = 1:2]
poly!(P, color = [:red, :green], strokecolor = [:blue, :red], strokewidth = 1)
ERROR: Buffer vertex does not have the same length as the other buffers.
color has length 2
vertex has length 9
valid_vertex has length 9
... |
Oh good catch! Do you want to make a pr for this? |
I am a little bit confused with the size of attribute using a vector of polygons:
works fine. Surprisingly, choosing one different color by triangle
produces an error. Is it the expected behavior?
Thanks!
The text was updated successfully, but these errors were encountered: