You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not really a bug, just an annoying error message.
In _axes.py, line 4283, the try clause catches errors in an unintended section of code and adds an error message that doesn't make sense to the traceback. For instance, if a ValueError is raised in the call to to_rgb_array(c), it will be caught and the error would be wrong.
Traceback (most recent call last):
File "/Users/user/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 4284, in _parse_scatter_color_args
colors = mcolors.to_rgba_array(c)
File "/Users/user/lib/python3.6/site-packages/matplotlib/colors.py", line 279, in to_rgba_array
raise ValueError("RGBA values should be within 0-1 range")
ValueError: RGBA values should be within 0-1 range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/user/lib/python3.6/site-packages/matplotlib/pyplot.py", line 2841, in scatter
None else {}), **kwargs)
File "/Users/user/lib/python3.6/site-packages/matplotlib/__init__.py", line 1599, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File "/Users/user/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 4453, in scatter
get_next_color_func=self._get_patches_for_fill.get_next_color)
File "/Users/user/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 4297, in _parse_scatter_color_args
.format(nc=n_elem, xs=xsize, ys=ysize)
ValueError: 'c' argument has 10 elements, which is not acceptable for use with 'x' with size 10, 'y' with size 10.
The first part of the traceback makes sense, but the last error message shouldn't be there, especially since it states something that is not true (number of elements is acceptable).
Matplotlib version
Operating system: MacOS 10.15.3
Matplotlib version: 3.1.2
Matplotlib backend: MacOSX
Python version: 3.6.8
Thanks!
The text was updated successfully, but these errors were encountered:
Bug report
Not really a bug, just an annoying error message.
In
_axes.py
, line 4283, thetry
clause catches errors in an unintended section of code and adds an error message that doesn't make sense to the traceback. For instance, if aValueError
is raised in the call toto_rgb_array(c)
, it will be caught and the error would be wrong.Code for reproduction:
This results in the following traceback:
The first part of the traceback makes sense, but the last error message shouldn't be there, especially since it states something that is not true (number of elements is acceptable).
Matplotlib version
Thanks!
The text was updated successfully, but these errors were encountered: