Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 344829c

Browse files
committed
fix: update datalim in stairs
1 parent 4735755 commit 344829c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6793,8 +6793,10 @@ def stairs(self, values, edges=None, *,
67936793
baseline = 0
67946794
if orientation == 'vertical':
67956795
patch.sticky_edges.y.append(np.min(baseline))
6796+
self.update_datalim([(edges[0], np.min(baseline))])
67966797
else:
67976798
patch.sticky_edges.x.append(np.min(baseline))
6799+
self.update_datalim([(np.min(baseline), edges[0])])
67986800
self._request_autoscale_view()
67996801
return patch
68006802

0 commit comments

Comments
 (0)