Skip to content
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

better error report when both style and color are passed to Series.plot #4402

Closed
Meobius opened this issue Jul 29, 2013 · 3 comments · Fixed by #4414

Comments

@Meobius
Copy link

commented Jul 29, 2013

The following command returns an error message for a Series

s.plot(style='k--', color='k')

It says that the color '[k]' is not recognized.

I am using pandas 0.11 so it may have been fixed in 0.12.

@cpcloud

This comment has been minimized.

Copy link
Member

commented Jul 31, 2013

you should do

s.plot(style='--', color='k')

matplotlib will just show you an empty plot with plot(s, linestyle='k--') and pandas will throw an error (more useful IMO)

there's no need to have style accept a string with a color name in it since as you show there's a color param to do that

for some reason MATLAB thought it was a good idea to couple line style and color 😑

this should report a better error tho for sure

@cpcloud

This comment has been minimized.

Copy link
Member

commented Jul 31, 2013

you can also leave out color and do it matlab style as well, but it doesn't make sense to have both

s.plot(style='k--')
@Meobius

This comment has been minimized.

Copy link
Author

commented Jul 31, 2013

Ok great thanks
On 31 Jul 2013 15:23, "Phillip Cloud" notifications@github.com wrote:

you can also leave out color and do it matlab style as well, but it
doesn't make sense to have both

s.plot(style='k--')


Reply to this email directly or view it on GitHubhttps://github.com//issues/4402#issuecomment-21865963
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.