@@ -823,15 +823,24 @@ end
823
823
824
824
# This is where we override the stuff to make it our stuff.
825
825
function Makie. plot! (axis:: GeoAxis , plot:: Makie.AbstractPlot )
826
+ # deal with setting the transform_func correctly
826
827
source = pop! (plot. kw, :source , axis. source)
827
828
transformfunc = lift (create_transform, axis. dest, source)
828
- trans = Transformation (transformfunc; get (plot. kw, :transformation , Attributes ())... )
829
+
830
+ trans = Makie. Transformation (transformfunc; get (plot. kw, :transformation , Attributes ())... )
829
831
plot. kw[:transformation ] = trans
832
+
833
+ # remove the reset_limits kwarg if there is one, this determines whether to automatically reset limits
834
+ # on plot insertion
835
+ reset_limits = to_value (pop! (plot. kw, :reset_limits , true ))
836
+
837
+ # actually plot
830
838
Makie. plot! (axis. scene, plot)
839
+
831
840
# some area-like plots basically always look better if they cover the whole plot area.
832
841
# adjust the limit margins in those cases automatically.
833
- Makie. needs_tight_limits (plot) && Makie. tightlimits! (axis)
834
- if Makie. is_open_or_any_parent (axis. scene)
842
+ Makie. needs_tight_limits (plot) && reset_limits && Makie. tightlimits! (axis)
843
+ if Makie. is_open_or_any_parent (axis. scene) && reset_limits
835
844
Makie. reset_limits! (axis)
836
845
end
837
846
return plot
0 commit comments