-
-
Notifications
You must be signed in to change notification settings - Fork 327
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
voronoiplot
with a matrix creates a 3D plot
#4335
Comments
It looks like an issue in julia> Makie.convert_arguments(Makie.Voronoiplot, rand(2, 5))
(Point{3, Float64}[[1.0, 1.0, 0.5306268315612478], [2.0, 1.0, 0.3057094707535708], [1.0, 2.0, 0.0386010373499962], [2.0, 2.0, 0.8346339986368071], [1.0, 3.0, 0.6964743865655425], [2.0, 3.0, 0.10789307734909603], [1.0, 4.0, 0.7161808096490242], [2.0, 4.0, 0.6060931129469319], [1.0, 5.0, 0.32697816623710696], [2.0, 5.0, 0.3249893139346661]],) The offending convert is: # For heatmap-like inputs
function convert_arguments(::Type{<:Voronoiplot}, mat::AbstractMatrix)
return convert_arguments(PointBased(), axes(mat, 1), axes(mat, 2), mat)
end I'm not sure what the idea was here - were the |
That is what I was looking for, yeah. It should be the same as plotting I'm not sure exactly the intention behind the |
It might be easier then to declare |
Looking back at the original PR, I think the intention was that it serves as a sort of nonlinear heat map |
Since @ffreyer (I think) was the one to implement this behaviour, I'll leave that to him. I personally forgot that was originally setup in the original PR until making this issue and was surprised that the behaviour was different to |
Yea I think nonlinear heatmaps were my reason for it.
Didn't know un-interpolated surface works, but it always uses quads while voronoi doesn't so I think there is still a use. E.g.: begin
v1 = Vec2f(1, 0)
v2 = Vec2f(cosd(60), sind(60))
ps = Point2f[x * v1 + y * v2 for x in 1:10, y in 1:10]
xs = first.(ps)
ys = last.(ps)
cs = rand(size(ps)...)
8D0D
f, a, p = surface(xs, ys, zeros(size(ps)), color = cs, interpolate = false)
a = Axis(f[1, 2])
# voronoiplot!(a, ps[:], color = cs)
voronoiplot!(a, xs, ys, cs)
f
end Maybe it's a bit pointless to have matrix conversions but I think more is better there. So I'd say just add a |
Using
voronoiplot
with a matrix creates a 3D plot. The 2D tessellation shown is incorrect.]st -m Makie
)]activate --temp; add Makie
)The text was updated successfully, but these errors were encountered: