8000 Only propagate minpos if it's been set. · matplotlib/matplotlib@b6d26c8 · GitHub
[go: up one dir, main page]

Skip to content

Commit b6d26c8

Browse files
committed
Only propagate minpos if it's been set.
This is mostly for the sake of third-party `Collection` subclasses that might have overridden `get_datalim`.
1 parent 9265a1c commit b6d26c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 4 additions & 2 deletions
8BB0
Original file line numberDiff line numberDiff line change
@@ -1990,8 +1990,10 @@ def add_collection(self, collection, autolim=True):
19901990
# pre-lazy-autoscale behavior, which is not really better).
19911991
self._unstale_viewLim()
19921992
datalim = collection.get_datalim(self.transData)
1993-
self.update_datalim(
1994-
np.row_stack([datalim.p0, datalim.minpos, datalim.p1]))
1993+
points = datalim.get_points()
1994+
if not np.isinf(datalim.minpos).all():
1995+
points = np.concatenate([points, [datalim.minpos]])
1996+
self.update_datalim(points)
19951997

19961998
self.stale = True
19971999
return collection

0 commit comments

Comments
 (0)
0