Skip to content

Commit

Permalink
fix voronoiplot limits
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer authored Sep 21, 2023
1 parent a8dce31 commit 7f7030c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/basic_recipes/voronoiplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,14 @@ end

function data_limits(p::Voronoiplot{<:Tuple{<:Vector{<:Point{N}}}}) where {N}
if transform_func(p) isa Polar
# Because the Polar transform is handled explicitly we cannot rely
# on the default data_limits. (data limits are pre transform)
iter = (to_ndim(Point3f, p, 0f0) for p in p.converted[1][])
limits_from_transformed_points(iter)
else
limits_from_transformed_points(iterate_transformed(p))
# First component is either another Voronoiplot or a poly plot. Both
# cases span the full limits of the plot
data_limits(p.plots[1])
end
end

Expand Down Expand Up @@ -231,4 +235,4 @@ function plot!(p::Voronoiplot{<:Tuple{<:DelTri.VoronoiTessellation}})
depth_shift=-2.0f-5)

return p
end
end

0 comments on commit 7f7030c

Please sign in to comment.