@@ -840,7 +840,7 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
840
840
trans = self .get_yaxis_transform (which = 'grid' )
841
841
l = mlines .Line2D ([xmin , xmax ], [y , y ], transform = trans , ** kwargs )
842
842
self .add_line (l )
843
- self .autoscale_view (scalex = False , scaley = scaley )
843
+ self ._request_autoscale_view (scalex = False , scaley = scaley )
844
844
return l
845
845
846
846
@docstring .dedent_interpd
@@ -909,7 +909,7 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
909
909
trans = self .get_xaxis_transform (which = 'grid' )
910
910
l = mlines .Line2D ([x , x ], [ymin , ymax ], transform = trans , ** kwargs )
911
911
self .add_line (l )
912
- self .autoscale_view (scalex = scalex , scaley = False )
912
+ self ._request_autoscale_view (scalex = scalex , scaley = False )
913
913
return l
914
914
915
915
@docstring .dedent_interpd
@@ -965,7 +965,7 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
965
965
p = mpatches .Polygon (verts , ** kwargs )
966
966
p .set_transform (trans )
967
967
self .add_patch (p )
968
- self .autoscale_view (scalex = False )
968
+ self ._request_autoscale_view (scalex = False )
969
969
return p
970
970
971
971
def axvspan (self , xmin , xmax , ymin = 0 , ymax = 1 , ** kwargs ):
@@ -1030,7 +1030,7 @@ def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
1030
1030
p = mpatches .Polygon (verts , ** kwargs )
1031
1031
p .set_transform (trans )
1032
1032
self .add_patch (p )
1033
- self .autoscale_view (scaley = False )
1033
+ self ._request_autoscale_view (scaley = False )
1034
1034
return p
1035
1035
1036
1036
@_preprocess_data (replace_names = ["y" , "xmin" , "xmax" , "colors" ],
@@ -1105,7 +1105,7 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
1105
1105
corners = (minx , miny ), (maxx , maxy )
1106
1106
1107
1107
self .update_datalim (corners )
1108
- self .autoscale_view ()
1108
+ self ._request_autoscale_view ()
1109
1109
1110
1110
return lines
1111
1111
@@ -1182,7 +1182,7 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
1182
1182
1183
1183
corners = (minx , miny ), (maxx , maxy )
1184
1184
self .update_datalim (corners )
1185
- self .autoscale_view ()
1185
+ self ._request_autoscale_view ()
1186
1186
1187
1187
return lines
1188
1188
@@ -1398,7 +1398,7 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
1398
1398
else : # "horizontal", None or "none" (see EventCollection)
1399
1399
corners = (minpos , minline ), (maxpos , maxline )
1400
1400
self .update_datalim (corners )
1401
- self .autoscale_view ()
1401
+ self ._request_autoscale_view ()
1402
1402
1403
1403
return colls
1404
1404
@@ -1642,7 +1642,7 @@ def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):
1642
1642
lines = [* self ._get_lines (* args , data = data , ** kwargs )]
1643
1643
for line in lines :
1644
1644
self .add_line (line )
1645
- self .autoscale_view (scalex = scalex , scaley = scaley )
1645
+ self ._request_autoscale_view (scalex = scalex , scaley = scaley )
1646
1646
return lines
1647
1647
1648
1648
@_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,
1718
1718
1719
1719
ret = self .plot (x , y , fmt , ** kwargs )
1720
1720
1721
- self .autoscale_view ()
1721
+ self ._request_autoscale_view ()
1722
1722
1723
1723
return ret
1724
1724
@@ -2422,7 +2422,7 @@ def bar(self, x, height, width=0.8, bottom=None, *, align="center",
2422
2422
ymin = ymin - np .max (yerr )
2423
2423
ymin = max (ymin * 0.9 , 1e-100 )
2424
2424
self .dataLim .intervaly = (ymin , ymax )
2425
- self .autoscale_view ()
2425
+ self ._request_autoscale_view ()
2426
2426
2427
2427
bar_container = BarContainer (patches , errorbar , label = label )
2428
2428
self .add_container (bar_container )
@@ -2623,7 +2623,7 @@ def broken_barh(self, xranges, yrange, **kwargs):
2623
2623
2624
2624
col = mcoll .BrokenBarHCollection (xranges_conv , yrange_conv , ** kwargs )
2625
2625
self .add_collection (col , autolim = True )
2626
- self .autoscale_view ()
2626
+ self ._request_autoscale_view ()
2627
2627
2628
2628
return col
2629
2629
@@ -3429,7 +3429,7 @@ def extract_err(err, data):
3429
3429
for l in caplines :
3430
3430
self .add_line (l )
3431
3431
3432
- self .autoscale_view ()
3432
+ self ._request_autoscale_view ()
3433
3433
errorbar_container = ErrorbarContainer ((data_line , tuple (caplines ),
3434
3434
tuple (barcols )),
3435
3435
has_xerr = (xerr is not None ),
@@ -4101,7 +4101,7 @@ def dopatch(xs, ys, **kwargs):
4101
4101
axis .set_major_formatter (formatter )
4102
4102
formatter .seq = [* formatter .seq , * datalabels ]
4103
4103
4104
- self .autoscale_view (
4104
+ self ._request_autoscale_view (
4105
4105
scalex = self ._autoscaleXon , scaley = self ._autoscaleYon )
4106
4106
4107
4107
return 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,
4479
4479
self .set_ymargin (0.05 )
4480
4480
4481
4481
self .add_collection (collection )
4482
- self .autoscale_view ()
4482
+ self ._request_autoscale_view ()
4483
4483
4484
4484
return collection
4485
4485
@@ -4832,9 +4832,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
4832
4832
4833
4833
corners = ((xmin , ymin ), (xmax , ymax ))
4834
4834
self .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 )
4838
4836
4839
4837
# add the collection last
4840
4838
self .add_collection (collection , autolim = False )
@@ -5004,7 +5002,7 @@ def quiver(self, *args, **kw):
5004
5002
q = mquiver .Quiver (self , * args , ** kw )
5005
5003
5006
5004
self .add_collection (q , autolim = True )
5007
- self .autoscale_view ()
5005
+ self ._request_autoscale_view ()
5008
5006
return q
5009
5007
quiver .__doc__ = mquiver .Quiver .quiver_doc
5010
5008
@@ -5020,7 +5018,7 @@ def barbs(self, *args, **kw):
5020
5018
5021
5019
b = mquiver .Barbs (self , * args , ** kw )
5022
5020
self .add_collection (b , autolim = True )
5023
- self .autoscale_view ()
5021
+ self ._request_autoscale_view ()
5024
5022
return b
5025
5023
5026
5024
# Uses a custom implementation of data-kwarg handling in
@@ -5075,7 +5073,7 @@ def fill(self, *args, data=None, **kwargs):
5075
5073
for poly in self ._get_patches_for_fill (* args , data = data , ** kwargs ):
5076
5074
self .add_patch (poly )
5077
5075
patches .append (poly )
5078
- self .autoscale_view ()
5076
+ self ._request_autoscale_view ()
5079
5077
return patches
5080
5078
5081
5079
@_preprocess_data (replace_names = ["x" , "y1" , "y2" , "where" ])
@@ -5257,7 +5255,7 @@ def get_interp_point(ind):
5257
5255
self .dataLim .update_from_data_xy (XY2 , self .ignore_existing_data_limits ,
5258
5256
updatex = False , updatey = True )
5259
5257
self .add_collection (collection , autolim = False )
5260
- self .autoscale_view ()
5258
+ self ._request_autoscale_view ()
5261
5259
return collection
5262
5260
5263
5261
@_preprocess_data (replace_names = ["y" , "x1" , "x2" , "where" ])
@@ -5438,7 +5436,7 @@ def get_interp_point(ind):
5438
5436
self .dataLim .update_from_data_xy (X2Y , self .ignore_existing_data_limits ,
5439
5437
updatex = True , updatey = False )
5440
5438
self .add_collection (collection , autolim = False )
5441
- self .autoscale_view ()
5439
+ self ._request_autoscale_view ()
5442
5440
return collection
5443
5441
5444
5442
#### 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,
5937
5935
collection .sticky_edges .y [:] = [miny , maxy ]
5938
5936
corners = (minx , miny ), (maxx , maxy )
5939
5937
self .update_datalim (corners )
5940
- self .autoscale_view ()
5938
+ self ._request_autoscale_view ()
5941
5939
return collection
5942
5940
5943
5941
@_preprocess_data ()
@@ -6150,7 +6148,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6150
6148
collection .sticky_edges .y [:] = [miny , maxy ]
6151
6149
corners = (minx , miny ), (maxx , maxy )
6152
6150
self .update_datalim (corners )
6153
- self .autoscale_view ()
6151
+ self ._request_autoscale_view ()
6154
6152
return collection
6155
6153
6156
6154
@_preprocess_data ()
@@ -6320,22 +6318,22 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6320
6318
ret .sticky_edges .x [:] = [xl , xr ]
6321
6319
ret .sticky_edges .y [:] = [yb , yt ]
6322
6320
self .update_datalim (np .array ([[xl , yb ], [xr , yt ]]))
6323
- self .autoscale_view (tight = True )
6321
+ self ._request_autoscale_view (tight = True )
6324
6322
return ret
6325
6323
6326
6324
@_preprocess_data ()
6327
6325
def contour (self , * args , ** kwargs ):
6328
6326
kwargs ['filled' ] = False
6329
6327
contours = mcontour .QuadContourSet (self , * args , ** kwargs )
6330
- self .autoscale_view ()
6328
+ self ._request_autoscale_view ()
6331
6329
return contours
6332
6330
contour .__doc__ = mcontour .QuadContourSet ._contour_doc
6333
6331
6334
6332
@_preprocess_data ()
6335
6333
def contourf (self , * args , ** kwargs ):
6336
6334
kwargs ['filled' ] = True
6337
6335
contours = mcontour .QuadContourSet (self , * args , ** kwargs )
6338
- self .autoscale_view ()
6336
+ self ._request_autoscale_view ()
6339
6337
return contours
6340
6338
contourf .__doc__ = mcontour .QuadContourSet ._contour_doc
6341
6339
@@ -6842,7 +6840,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
6842
6840
6843
6841
self .set_autoscalex_on (_saved_autoscalex )
6844
6842
self .set_autoscaley_on (_saved_autoscaley )
6845
- self .autoscale_view ()
6843
+ self ._request_autoscale_view ()
6846
6844
6847
6845
if label is None :
6848
6846
labels = [None ]
0 commit comments