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

Skip to content

Commit d813e0e

Browse files
committed
Add c, x, y shapes to unacceptable color sequence ValueError message
1 parent 494b12b commit d813e0e

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
@@ -3987,7 +3987,9 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
39873987
mcolors.to_rgba_array(colors)
39883988
except ValueError:
39893989
# c not acceptable as PathCollection facecolor
3990-
raise ValueError("c not acceptable as color sequence")
3990+
msg = ("c of shape {0} not acceptable as a color sequence "
3991+
"for x with shape {1}, y with shape {2}")
3992+
raise ValueError(msg.format(c.shape, x.shape, y.shape))
39913993
else:
39923994
colors = None # use cmap, norm after collection is created
39933995

0 commit comments

Comments
 (0)