8000 Merge pull request #18886 from jklymak/backport-18860 · matplotlib/matplotlib@b65885c · GitHub
[go: up one dir, main page]

Skip to content

Commit b65885c

Browse files
authored
Merge pull request #18886 from jklymak/backport-18860
Backport #18860 on branch v3.3.x
2 parents 2eb851a + 8988155 commit b65885c

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)
0