-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
VIS: plot method cannot handle new 'C0'-like colors (matplotlib 2.0) #15516
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
Comments
This one is pretty old, but I'd love to revive it. I'm not sure how tests will cover this change. Is it alright if I give it a try anyway? |
sure! try adding. test with the code as above (u will check this plot works) |
@jorisvandenbossche we're now getting warnings about upper-case letters. Do we want to support upper-case specifically? If not, its an easy edit to get rid of the warnings in the CI logs. |
Answered in the other thread, but to have it here as well: yes we want to support those upper-case ones specifically. They are a specific color naming scheme of matplotlib. |
matplotlib 2.0 introduced a few 2-character color abbreviations: C0, C1, C2, ... to refer to the colors of the current color cycle
(very handy! this way you can refer to a color of the color cycle without hardcoding it, and use it as a shortcut for
color='tab:blue'
if you want the new blue instead of the uglycolor='b'
)But, it seems pandas cannot handle this at the moment, as it tries to interpret it as multiple colors:
gives
ValueError: 'C0' can be parsed as both single color and color cycle. Specify each color using a list like ['C0'] or ['C', '0']
I know the error message already gives the solution (using
color=['C0']
), but I think it would be nice to special case those to have to working by default.The text was updated successfully, but these errors were encountered: