@@ -840,7 +840,7 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
840840trans = self .get_yaxis_transform (which = 'grid' )
841841l = mlines .Line2D ([xmin ,xmax ], [y ,y ],transform = trans ,** kwargs )
842842self .add_line (l )
843- self .autoscale_view (scalex = False ,scaley = scaley )
843+ self ._request_autoscale_view (scalex = False ,scaley = scaley )
844844return l
845845
846846@docstring .dedent_interpd
@@ -909,7 +909,7 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
909909trans = self .get_xaxis_transform (which = 'grid' )
910910l = mlines .Line2D ([x ,x ], [ymin ,ymax ],transform = trans ,** kwargs )
911911self .add_line (l )
912- self .autoscale_view (scalex = scalex ,scaley = False )
912+ self ._request_autoscale_view (scalex = scalex ,scaley = False )
913913return l
914914
915915@docstring .dedent_interpd
@@ -965,7 +965,7 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
965965p = mpatches .Polygon (verts ,** kwargs )
966966p .set_transform (trans )
967967self .add_patch (p )
968- self .autoscale_view (scalex = False )
968+ self ._request_autoscale_view (scalex = False )
969969return p
970970
971971def axvspan (self ,xmin ,xmax ,ymin = 0 ,ymax = 1 ,** kwargs ):
@@ -1030,7 +1030,7 @@ def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
10301030p = mpatches .Polygon (verts ,** kwargs )
10311031p .set_transform (trans )
10321032self .add_patch (p )
1033- self .autoscale_view (scaley = False )
1033+ self ._request_autoscale_view (scaley = False )
10341034return p
10351035
10361036@_preprocess_data (replace_names = ["y" ,"xmin" ,"xmax" ,"colors" ],
@@ -1105,7 +1105,7 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
11051105corners = (minx ,miny ), (maxx ,maxy )
11061106
11071107self .update_datalim (corners )
1108- self .autoscale_view ()
1108+ self ._request_autoscale_view ()
11091109
11101110return lines
11111111
@@ -1182,7 +1182,7 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
11821182
11831183corners = (minx ,miny ), (maxx ,maxy )
11841184self .update_datalim (corners )
1185- self .autoscale_view ()
1185+ self ._request_autoscale_view ()
11861186
11871187return lines
11881188
@@ -1398,7 +1398,7 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
13981398else :# "horizontal", None or "none" (see EventCollection)
13991399corners = (minpos ,minline ), (maxpos ,maxline )
14001400self .update_datalim (corners )
1401- self .autoscale_view ()
1401+ self ._request_autoscale_view ()
14021402
14031403return colls
14041404
@@ -1642,7 +1642,7 @@ def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):
16421642lines = [* self ._get_lines (* args ,data = data ,** kwargs )]
16431643for line in lines :
16441644self .add_line (line )
1645- self .autoscale_view (scalex = scalex ,scaley = scaley )
1645+ self ._request_autoscale_view (scalex = scalex ,scaley = scaley )
16461646return lines
16471647
16481648@_preprocess_data (replace_names = ["x" ,"y" ],label_namer = "y" )
@@ -1718,7 +1718,7 @@ def plot_date(self, x, y, fmt='o', tz=None, xdate=True, ydate=False,
17181718
17191719ret = self .plot (x ,y ,fmt ,** kwargs )
17201720
1721- self .autoscale_view ()
1721+ self ._request_autoscale_view ()
17221722
17231723return ret
17241724
@@ -2422,7 +2422,7 @@ def bar(self, x, height, width=0.8, bottom=None, *, align="center",
24222422ymin = ymin - np .max (yerr )
24232423ymin = max (ymin * 0.9 ,1e-100 )
24242424self .dataLim .intervaly = (ymin ,ymax )
2425- self .autoscale_view ()
2425+ self ._request_autoscale_view ()
24262426
24272427bar_container = BarContainer (patches ,errorbar ,label = label )
24282428self .add_container (bar_container )
@@ -2623,7 +2623,7 @@ def broken_barh(self, xranges, yrange, **kwargs):
26232623
26242624col = mcoll .BrokenBarHCollection (xranges_conv ,yrange_conv ,** kwargs )
26252625self .add_collection (col ,autolim = True )
2626- self .autoscale_view ()
2626+ self ._request_autoscale_view ()
26272627
26282628return col
26292629
@@ -3429,7 +3429,7 @@ def extract_err(err, data):
34293429for l in caplines :
34303430self .add_line (l )
34313431
3432- self .autoscale_view ()
3432+ self ._request_autoscale_view ()
34333433errorbar_container = ErrorbarContainer ((data_line ,tuple (caplines ),
34343434tuple (barcols )),
34353435has_xerr = (xerr is not None ),
@@ -4101,7 +4101,7 @@ def dopatch(xs, ys, **kwargs):
41014101axis .set_major_formatter (formatter )
41024102formatter .seq = [* formatter .seq ,* datalabels ]
41034103
4104- self .autoscale_view (
4104+ self ._request_autoscale_view (
41054105scalex = self ._autoscaleXon ,scaley = self ._autoscaleYon )
41064106
41074107return dict (whiskers = whiskers ,caps = caps ,boxes = boxes ,
@@ -4479,7 +4479,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
44794479self .set_ymargin (0.05 )
44804480
44814481self .add_collection (collection )
4482- self .autoscale_view ()
4482+ self ._request_autoscale_view ()
44834483
44844484return collection
44854485
@@ -4832,9 +4832,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
48324832
48334833corners = ((xmin ,ymin ), (xmax ,ymax ))
48344834self .update_datalim (corners )
4835- collection .sticky_edges .x [:]= [xmin ,xmax ]
4836- collection .sticky_edges .y [:]= [ymin ,ymax ]
4837- self .autoscale_view (tight = True )
4835+ self ._request_autoscale_view (tight = True )
48384836
48394837# add the collection last
48404838self .add_collection (collection ,autolim = False )
@@ -5004,7 +5002,7 @@ def quiver(self, *args, **kw):
50045002q = mquiver .Quiver (self ,* args ,** kw )
50055003
50065004self .add_collection (q ,autolim = True )
5007- self .autoscale_view ()
5005+ self ._request_autoscale_view ()
50085006return q
50095007quiver .__doc__ = mquiver .Quiver .quiver_doc
50105008
@@ -5020,7 +5018,7 @@ def barbs(self, *args, **kw):
50205018
50215019b = mquiver .Barbs (self ,* args ,** kw )
50225020self .add_collection (b ,autolim = True )
5023- self .autoscale_view ()
5021+ self ._request_autoscale_view ()
50245022return b
50255023
50265024# Uses a custom implementation of data-kwarg handling in
@@ -5075,7 +5073,7 @@ def fill(self, *args, data=None, **kwargs):
50755073for poly in self ._get_patches_for_fill (* args ,data = data ,** kwargs ):
50765074self .add_patch (poly )
50775075patches .append (poly )
5078- self .autoscale_view ()
5076+ self ._request_autoscale_view ()
50795077return patches
50805078
50815079@_preprocess_data (replace_names = ["x" ,"y1" ,"y2" ,"where" ])
@@ -5257,7 +5255,7 @@ def get_interp_point(ind):
52575255self .dataLim .update_from_data_xy (XY2 ,self .ignore_existing_data_limits ,
52585256updatex = False ,updatey = True )
52595257self .add_collection (collection ,autolim = False )
5260- self .autoscale_view ()
5258+ self ._request_autoscale_view ()
52615259return collection
52625260
52635261@_preprocess_data (replace_names = ["y" ,"x1" ,"x2" ,"where" ])
@@ -5438,7 +5436,7 @@ def get_interp_point(ind):
54385436self .dataLim .update_from_data_xy (X2Y ,self .ignore_existing_data_limits ,
54395437updatex = True ,updatey = False )
54405438self .add_collection (collection ,autolim = False )
5441- self .autoscale_view ()
5439+ self ._request_autoscale_view ()
54425440return collection
54435441
54445442#### plotting z(x,y): imshow, pcolor and relatives, contour
@@ -5937,7 +5935,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
59375935collection .sticky_edges .y [:]= [miny ,maxy ]
59385936corners = (minx ,miny ), (maxx ,maxy )
59395937self .update_datalim (corners )
5940- self .autoscale_view ()
5938+ self ._request_autoscale_view ()
59415939return collection
59425940
59435941@_preprocess_data ()
@@ -6150,7 +6148,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
61506148collection .sticky_edges .y [:]= [miny ,maxy ]
61516149corners = (minx ,miny ), (maxx ,maxy )
61526150self .update_datalim (corners )
6153- self .autoscale_view ()
6151+ self ._request_autoscale_view ()
61546152return collection
61556153
61566154@_preprocess_data ()
@@ -6320,22 +6318,22 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
63206318ret .sticky_edges .x [:]= [xl ,xr ]
63216319ret .sticky_edges .y [:]= [yb ,yt ]
63226320self .update_datalim (np .array ([[xl ,yb ], [xr ,yt ]]))
6323- self .autoscale_view (tight = True )
6321+ self ._request_autoscale_view (tight = True )
63246322return ret
63256323
63266324@_preprocess_data ()
63276325def contour (self ,* args ,** kwargs ):
63286326kwargs ['filled' ]= False
63296327contours = mcontour .QuadContourSet (self ,* args ,** kwargs )
6330- self .autoscale_view ()
6328+ self ._request_autoscale_view ()
63316329return contours
63326330contour .__doc__ = mcontour .QuadContourSet ._contour_doc
63336331
63346332@_preprocess_data ()
63356333def contourf (self ,* args ,** kwargs ):
63366334kwargs ['filled' ]= True
63376335contours = mcontour .QuadContourSet (self ,* args ,** kwargs )
6338- self .autoscale_view ()
6336+ self ._request_autoscale_view ()
63396337return contours
63406338contourf .__doc__ = mcontour .QuadContourSet ._contour_doc
63416339
@@ -6842,7 +6840,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
68426840
68436841self .set_autoscalex_on (_saved_autoscalex )
68446842self .set_autoscaley_on (_saved_autoscaley )
6845- self .autoscale_view ()
6843+ self ._request_autoscale_view ()
68466844
68476845if label is None :
68486846labels = [None ]