Skip to content

Commit 8988155

Browse files
committed
Backport: manual
1 parent 2eb851a commit 8988155

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/colorbar.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,9 @@ def _add_solids(self, X, Y, C):
788788
Draw the colors using `~.axes.Axes.pcolormesh`;
789789
optionally add separators.
790790
"""
791+
if C.shape[0] == Y.shape[0]:
792+
# trim the last one to be compatible with old behavior.
793+
C = C[:-1]
791794
if self.orientation == 'vertical':
792795
args = (X, Y, C)
793796
else:

0 commit comments

Comments
 (0)