Thanks to visit codestin.com Credit goes to github.com
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 5584ba7 commit b1b0006Copy full SHA for b1b0006
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