Skip to content

Commit 1a50dda

Browse files
committed
restore autoscale(tight=True); still needed for classic mode.
1 parent 70a37f1 commit 1a50dda

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4421,7 +4421,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
44214421
self.update_datalim(corners)
44224422
collection.sticky_edges.x[:] = [xmin, xmax]
44234423
collection.sticky_edges.y[:] = [ymin, ymax]
4424-
self.autoscale_view()
4424+
self.autoscale_view(tight=True)
44254425

44264426
# add the collection last
44274427
self.add_collection(collection, autolim=False)
@@ -5830,7 +5830,7 @@ def pcolorfast(self, *args, **kwargs):
58305830
ret.sticky_edges.x[:] = [xl, xr]
58315831
ret.sticky_edges.y[:] = [yb, yt]
58325832
self.update_datalim(np.array([[xl, yb], [xr, yt]]))
5833-
self.autoscale_view()
5833+
self.autoscale_view(tight=True)
58345834
return ret
58355835

58365836
@_preprocess_data()

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ def __init__(self, ax, *args, **kwargs):
968968
col.sticky_edges.x[:] = [self._mins[0], self._maxs[0]]
969969
col.sticky_edges.y[:] = [self._mins[1], self._maxs[1]]
970970
self.ax.update_datalim([self._mins, self._maxs])
971-
self.ax.autoscale_view()
971+
self.ax.autoscale_view(tight=True)
972972

973973
self.changed() # set the colors
974974

0 commit comments

Comments
 (0)