Skip to content

Commit a2d2b80

Browse files
authored
Merge pull request #12547 from QuLogic/disable-stickies-more
Disable sticky edge accumulation if no autoscaling.
2 parents a8dca07 + 318a589 commit a2d2b80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/axes/_base.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -2403,7 +2403,9 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True):
24032403
if tight is not None:
24042404
self._tight = bool(tight)
24052405

2406-
if self.use_sticky_edges and (self._xmargin or self._ymargin):
2406+
if self.use_sticky_edges and (
2407+
(self._xmargin and scalex and self._autoscaleXon) or
2408+
(self._ymargin and scaley and self._autoscaleYon)):
24072409
stickies = [artist.sticky_edges for artist in self.get_children()]
24082410
x_stickies = np.array([x for sticky in stickies for x in sticky.x])
24092411
y_stickies = np.array([y for sticky in stickies for y in sticky.y])

0 commit comments

Comments
 (0)