8000 Backport PR #14069: Don't try to use the colorbar formatter to format… · meeseeksmachine/matplotlib@74f0f0a · GitHub
[go: up one dir, main page]

Skip to content

Commit 74f0f0a

Browse files
dstansbyMeeseeksDev[bot]
authored andcommitted
Backport PR matplotlib#14069: Don't try to use the colorbar formatter to format RGBA data.
1 parent af7f6b5 commit 74f0f0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ def get_cursor_data(self, event):
933933
return arr[i, j]
934934

935935
def format_cursor_data(self, data):
936-
if self.colorbar:
936+
if np.ndim(data) == 0 and self.colorbar:
937937
return (
938938
"["
939939
+ cbook.strip_math(

0 commit comments

Comments
 (0)
0