From 7f7030c20106ca8f27fe2c76a9e28f0e4aca98dd Mon Sep 17 00:00:00 2001 From: Frederic Freyer Date: Thu, 21 Sep 2023 17:34:03 +0200 Subject: [PATCH] fix voronoiplot limits --- src/basic_recipes/voronoiplot.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/basic_recipes/voronoiplot.jl b/src/basic_recipes/voronoiplot.jl index 89e67337043..0a2dd133ec3 100644 --- a/src/basic_recipes/voronoiplot.jl +++ b/src/basic_recipes/voronoiplot.jl @@ -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 @@ -231,4 +235,4 @@ function plot!(p::Voronoiplot{<:Tuple{<:DelTri.VoronoiTessellation}}) depth_shift=-2.0f-5) return p -end \ No newline at end of file +end