@@ -863,7 +863,7 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
863
863
trans = self .get_yaxis_transform (which = 'grid' )
864
864
l = mlines .Line2D ([xmin , xmax ], [y , y ], transform = trans , ** kwargs )
865
865
self .add_line (l )
866
- self .autoscale_view (scalex = False , scaley = scaley )
866
+ self ._request_autoscale_view (scalex = False , scaley = scaley )
867
867
return l
868
868
869
869
@docstring .dedent_interpd
@@ -932,7 +932,7 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
932
932
trans = self .get_xaxis_transform (which = 'grid' )
933
933
l = mlines .Line2D ([x , x ], [ymin , ymax ], transform = trans , ** kwargs )
934
934
self .add_line (l )
935
- self .autoscale_view (scalex = scalex , scaley = False )
935
+ self ._request_autoscale_view (scalex = scalex , scaley = False )
936
936
return l
937
937
938
938
@docstring .dedent_interpd
@@ -988,7 +988,7 @@ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
988
988
p = mpatches .Polygon (verts , ** kwargs )
989
989
p .set_transform (trans )
990
990
self .add_patch (p )
991
- self .autoscale_view (scalex = False )
991
+ self ._request_autoscale_view (scalex = False )
992
992
return p
993
993
994
994
def axvspan (self , xmin , xmax , ymin = 0 , ymax = 1 , ** kwargs ):
@@ -1053,7 +1053,7 @@ def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
1053
1053
p = mpatches .Polygon (verts , ** kwargs )
1054
1054
p .set_transform (trans )
1055
1055
self .add_patch (p )
1056
- self .autoscale_view (scaley = False )
1056
+ self ._request_autoscale_view (scaley = False )
1057
1057
return p
1058
1058
1059
1059
@_preprocess_data (replace_names = ["y" , "xmin" , "xmax" , "colors" ],
@@ -1128,7 +1128,7 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
1128
1128
corners = (minx , miny ), (maxx , maxy )
1129
1129
1130
1130
self .update_datalim (corners )
1131
- self .autoscale_view ()
1131
+ self ._request_autoscale_view ()
1132
1132
1133
1133
return lines
1134
1134
@@ -1205,7 +1205,7 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
1205
1205
1206
1206
corners = (minx , miny ), (maxx , maxy )
1207
1207
self .update_datalim (corners )
1208
- self .autoscale_view ()
1208
+ self ._request_autoscale_view ()
1209
1209
1210
1210
return lines
1211
1211
@@ -1421,7 +1421,7 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
1421
1421
else : # "horizontal", None or "none" (see EventCollection)
1422
1422
corners = (minpos , minline ), (maxpos , maxline )
1423
1423
self .update_datalim (corners )
1424
- self .autoscale_view ()
1424
+ self ._request_autoscale_view ()
1425
1425
1426
1426
return colls
1427
1427
@@ -1665,7 +1665,7 @@ def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):
1665
1665
lines = [* self ._get_lines (* args , data = data , ** kwargs )]
1666
1666
for line in lines :
1667
1667
self .add_line (line )
1668
- self .autoscale_view (scalex = scalex , scaley = scaley )
1668
+ self ._request_autoscale_view (scalex = scalex , scaley = scaley )
1669
1669
return lines
1670
1670
1671
1671
@_preprocess_data (replace_names = ["x" , "y" ], label_namer = "y" )
@@ -1741,7 +1741,7 @@ def plot_date(self, x, y, fmt='o', tz=None, xdate=True, ydate=False,
1741
1741
1742
1742
ret = self .plot (x , y , fmt , ** kwargs )
1743
1743
1744
- self .autoscale_view ()
1744
+ self ._request_autoscale_view ()
1745
1745
1746
1746
return ret
1747
1747
@@ -2453,7 +2453,7 @@ def bar(self, x, height, width=0.8, bottom=None, *, align="center",
2453
2453
ymin = ymin - np .max (yerr )
2454
2454
ymin = max (ymin * 0.9 , 1e-100 )
2455
2455
self .dataLim .intervaly = (ymin , ymax )
2456
- self .autoscale_view ()
2456
+ self ._request_autoscale_view ()
2457
2457
2458
2458
bar_container = BarContainer (patches , errorbar , label = label )
2459
2459
self .add_container (bar_container )
@@ -2649,7 +2649,7 @@ def broken_barh(self, xranges, yrange, **kwargs):
2649
2649
2650
2650
col = mcoll .BrokenBarHCollection (xranges_conv , yrange_conv , ** kwargs )
2651
2651
self .add_collection (col , autolim = True )
2652
- self .autoscale_view ()
2652
+ self ._request_autoscale_view ()
2653
2653
2654
2654
return col
2655
2655
@@ -3462,7 +3462,7 @@ def extract_err(err, data):
3462
3462
for l in caplines :
3463
3463
self .add_line (l )
3464
3464
3465
- self .autoscale_view ()
3465
+ self ._request_autoscale_view ()
3466
3466
errorbar_container = ErrorbarContainer ((data_line , tuple (caplines ),
3467
3467
tuple (barcols )),
3468
3468
has_xerr = (xerr is not None ),
@@ -4130,7 +4130,7 @@ def dopatch(xs, ys, **kwargs):
4130
4130
axis .set_major_formatter (formatter )
4131
4131
formatter .seq = [* formatter .seq , * datalabels ]
4132
4132
4133
- self .autoscale_view (
4133
+ self ._request_autoscale_view (
4134
4134
scalex = self ._autoscaleXon , scaley = self ._autoscaleYon )
4135
4135
4136
4136
return dict (whiskers = whiskers , caps = caps , boxes = boxes ,
@@ -4501,7 +4501,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4501
4501
self .set_ymargin (0.05 )
4502
4502
4503
4503
self .add_collection (collection )
4504
- self .autoscale_view ()
4504
+ self ._request_autoscale_view ()
4505
4505
4506
4506
return collection
4507
4507
@@ -4841,9 +4841,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
4841
4841
4842
4842
corners = ((xmin , ymin ), (xmax , ymax ))
4843
4843
self .update_datalim (corners )
4844
- collection .sticky_edges .x [:] = [xmin , xmax ]
4845
- collection .sticky_edges .y [:] = [ymin , ymax ]
4846
- self .autoscale_view (tight = True )
4844
+ self ._request_autoscale_view (tight = True )
4847
4845
4848
4846
# add the collection last
4849
4847
self .add_collection (collection , autolim = False )
@@ -5013,7 +5011,7 @@ def quiver(self, *args, **kw):
5013
5011
q = mquiver .Quiver (self , * args , ** kw )
5014
5012
5015
5013
self .add_collection (q , autolim = True )
5016
- self .autoscale_view ()
5014
+ self ._request_autoscale_view ()
5017
5015
return q
5018
5016
quiver .__doc__ = mquiver .Quiver .quiver_doc
5019
5017
@@ -5029,7 +5027,7 @@ def barbs(self, *args, **kw):
5029
5027
5030
5028
b = mquiver .Barbs (self , * args , ** kw )
5031
5029
self .add_collection (b , autolim = True )
5032
- self .autoscale_view ()
5030
+ self ._request_autoscale_view ()
5033
5031
return b
5034
5032
5035
5033
# Uses a custom implementation of data-kwarg handling in
@@ -5084,7 +5082,7 @@ def fill(self, *args, data=None, **kwargs):
5084
5082
for poly in self ._get_patches_for_fill (* args , data = data , ** kwargs ):
5085
5083
self .add_patch (poly )
5086
5084
patches .append (poly )
5087
- self .autoscale_view ()
5085
+ self ._request_autoscale_view ()
5088
5086
return patches
5089
5087
5090
5088
@_preprocess_data (replace_names = ["x" , "y1" , "y2" , "where" ])
@@ -5265,7 +5263,7 @@ def get_interp_point(ind):
5265
5263
self .dataLim .update_from_data_xy (XY2 , self .ignore_existing_data_limits ,
5266
5264
updatex = False , updatey = True )
5267
5265
self .add_collection (collection , autolim = False )
5268
- self .autoscale_view ()
5266
+ self ._request_autoscale_view ()
5269
5267
return collection
5270
5268
5271
5269
@_preprocess_data (replace_names = ["y" , "x1" , "x2" , "where" ])
@@ -5445,7 +5443,7 @@ def get_interp_point(ind):
5445
5443
self .dataLim .update_from_data_xy (X2Y , self .ignore_existing_data_limits ,
5446
5444
updatex = True , updatey = False )
5447
5445
self .add_collection (collection , autolim = False )
5448
- self .autoscale_view ()
5446
+ self ._request_autoscale_view ()
5449
5447
return collection
5450
5448
5451
5449
#### plotting z(x,y): imshow, pcolor and relatives, contour
@@ -5944,7 +5942,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5944
5942
collection .sticky_edges .y [:] = [miny , maxy ]
5945
5943
corners = (minx , miny ), (maxx , maxy )
5946
5944
self .update_datalim (corners )
5947
- self .autoscale_view ()
5945
+ self ._request_autoscale_view ()
5948
5946
return collection
5949
5947
5950
5948
@_preprocess_data ()
@@ -6156,7 +6154,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6156
6154
collection .sticky_edges .y [:] = [miny , maxy ]
6157
6155
corners = (minx , miny ), (maxx , maxy )
6158
6156
self .update_datalim (corners )
6159
- self .autoscale_view ()
6157
+ self ._request_autoscale_view ()
6160
6158
return collection
6161
6159
6162
6160
@_preprocess_data ()
@@ -6342,22 +6340,22 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6342
6340
ret .sticky_edges .x [:] = [xl , xr ]
6343
6341
ret .sticky_edges .y [:] = [yb , yt ]
6344
6342
self .update_datalim (np .array ([[xl , yb ], [xr , yt ]]))
6345
- self .autoscale_view (tight = True )
6343
+ self ._request_autoscale_view (tight = True )
6346
6344
return ret
6347
6345
6348
6346
@_preprocess_data ()
6349
6347
def contour (self , * args , ** kwargs ):
6350
6348
kwargs ['filled' ] = False
6351
6349
contours = mcontour .QuadContourSet (self , * args , ** kwargs )
6352
- self .autoscale_view ()
6350
+ self ._request_autoscale_view ()
6353
6351
return contours
6354
6352
contour .__doc__ = mcontour .QuadContourSet ._contour_doc
6355
6353
6356
6354
@_preprocess_data ()
6357
6355
def contourf (self , * args , ** kwargs ):
6358
6356
kwargs ['filled' ] = True
6359
6357
contours = mcontour .QuadContourSet (self , * args , ** kwargs )
6360
- self .autoscale_view ()
6358
+ self ._request_autoscale_view ()
6361
6359
return contours
6362
6360
contourf .__doc__ = mcontour .QuadContourSet ._contour_doc
6363
6361
@@ -6872,7 +6870,7 @@ def hist(self, x, bins=None, range=None, density=None, weights=None,
6872
6870
6873
6871
self .set_autoscalex_on (_saved_autoscalex )
6874
6872
self .set_autoscaley_on (_saved_autoscaley )
6875
- self .autoscale_view ()
6873
+ self ._request_autoscale_view ()
6876
6874
6877
6875
if label is None :
6878
6876
labels = [None ]
0 commit comments