-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: DataFrame.plot raises ValueError when color name is specified by multiple characters #10387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Why is the third case not OK? I would only rasie the error if the length is correct (corresponds with the number of columns, as only then it is ambiguous?) |
Ah, I meant NG(raise error) in current master. The fix allows to draw 3rd case with 3 lines in green.
Currently, the logic only checks whether the input can be parsed as both single color and color cycle, without comparing input length and the number of columns. Because |
ah, yes :-) Yes, for the length, you can ignore my comment, as now if the length is shorter it is regarded as a cycle that gets repeated, I see now |
# ``colors`` is regarded as color cycle. | ||
# mpl will raise error any of them is invalid | ||
pass | ||
print(colors, num_colors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 😓
8154b1a
to
6d8a192
Compare
@TomAugspurger Can you check this when you have a time? |
… multiple characters
@TomAugspurger @jorisvandenbossche Looks OK? Let me merge this if there is no objection until this weekend. |
Looks ok to me! |
👍 |
BUG: DataFrame.plot raises ValueError when color name is specified by multiple characters
Voila! |
Thanks. Will back to #9894. |
Derived from #9894. Passing color name with multiple characters results in
ValueError
. Below is the bahavior of current master.If passed str can be parsed as both single color and color cycle, following error will be raised.
Currently, there is no color name which can meet above condition (thus cannot tested).