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
{{ message }}
Repository navigation
Scatter doesn't accept a list of strings as color spec. #12438
I wonder if this is the correct fix. The documentation also states
c : color, sequence, or sequence of color, optional, default: 'b'
The marker color. Possible values:
A single color format string.
A sequence of color specifications of length n.
So for
plt.scatter([0,1],[2,3],c=("0.5", "0.7"))
one would expect two points with different shades of grey. But this is converted to an array of values and shown with the viridis colormap.
Not sure if the documentation is wrong here or the code.
Given that plt.scatter([0,1],[2,3],c=("r", "b")) works as expected and that "0.5", "0.7" are well-documented as strings meaning levels of gray, I'd argue it's a code bug, not a documentation one.
Activity
anntzer commentedon Oct 8, 2018
Given that
plt.scatter([0,1],[2,3],c=("r", "b"))works as expected and that "0.5", "0.7" are well-documented as strings meaning levels of gray, I'd argue it's a code bug, not a documentation one.jklymak commentedon Oct 8, 2018
#12431 looks after this as well...