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

Skip to content

Commit 0efbd3a

Browse files
committed
FIX: properly set x/y limits
1 parent 859e42f commit 0efbd3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/colorbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,8 +595,8 @@ def _config_axes(self, X, Y):
595595
ax.set_navigate(False)
596596
xy = self._outline(X, Y)
597597
ax.update_datalim(xy)
598-
ax.set_xlim(*ax.dataLim.intervalx)
599-
ax.set_ylim(*ax.dataLim.intervaly)
598+
ax.set_xlim(np.min(X), np.max(X))
599+
ax.set_ylim(np.min(Y), np.max(Y))
600600
if self.outline is not None:
601601
self.outline.remove()
602602
self.outline = mpatches.Polygon(

0 commit comments

Comments
 (0)