8000 Add c, x, y shapes to unacceptable color sequence ValueError message · matplotlib/matplotlib@65e6a64 · GitHub
[go: up one dir, main page]

Skip to content

Commit 65e6a64

Browse files
committed
Add c, x, y shapes to unacceptable color sequence ValueError message
1 parent d03b0e0 commit 65e6a64
8000

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3990,7 +3990,9 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
39903990
mcolors.to_rgba_array(colors)
39913991
except ValueError:
39923992
# c not acceptable as PathCollection facecolor
3993-
raise ValueError("c not acceptable as color sequence")
3993+
msg = ("c of shape {0} not acceptable as a color sequence "
3994+
"for x with shape {1}, y with shape {2}")
3995+
raise ValueError(msg.format(c.shape, x.shape, y.shape))
39943996
else:
39953997
colors = None # use cmap, norm after collection is created
39963998

0 commit comments

Comments
 (0)
0