Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 48bd1ce

Browse files
committed
Add c, x, y shapes to unacceptable color sequence ValueError message
1 parent d1bf75f commit 48bd1ce

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
@@ -4030,7 +4030,9 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
40304030
mcolors.to_rgba_array(colors)
40314031
except ValueError:
40324032
# c not acceptable as PathCollection facecolor
4033-
raise ValueError("c not acceptable as color sequence")
4033+
msg = ("c of shape {0} not acceptable as a color sequence "
4034+
"for x with shape {1}, y with shape {2}")
4035+
raise ValueError(msg.format(c.shape, x.shape, y.shape))
40344036
else:
40354037
colors = None # use cmap, norm after collection is created
40364038

0 commit comments

Comments
 (0)