8000 FIX: stop deprecation message colorbar · matplotlib/matplotlib@4236e82 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4236e82

Browse files
jklymakanntzer
authored andcommitted
FIX: stop deprecation message colorbar
1 parent 82e2f94 commit 4236e82

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
@@ -792,6 +792,9 @@ def _add_solids(self, X, Y, C):
792792

793793
def _add_solids_pcolormesh(self, X, Y, C):
794794
_log.debug('Setting pcolormesh')
795+
if C.shape[0] == Y.shape[0]:
796+
# trim the last one to be compatible with old behavior.
797+
C = C[:-1]
795798
self.solids = self.ax.pcolormesh(
796799
X, Y, C, cmap=self.cmap, norm=self.norm, alpha=self.alpha,
797800
edgecolors='none', shading='flat')

0 commit comments

Comments
 (0)
0