We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80eabbc commit ff891deCopy full SHA for ff891de
lib/matplotlib/colors.py
@@ -265,6 +265,10 @@ def _to_rgba_no_colorcycle(c, alpha=None):
265
f"Value must be within 0-1 range")
266
return c, c, c, alpha if alpha is not None else 1.
267
raise ValueError(f"Invalid RGBA argument: {orig_c!r}")
268
+ # turn 2-D array into 1-D array
269
+ if isinstance(c, np.ndarray):
270
+ if c.ndim == 2 and c.shape[0] == 1:
271
+ c = c.reshape((-1))
272
# tuple color.
273
if not np.iterable(c):
274
0 commit comments