Skip to content

BUG: automatic color cycling when plotting Series without style or color argument (fixes #2816) #2836

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

Closed
wants to merge 3 commits into from

Conversation

lesteve
Copy link
Contributor

@lesteve lesteve commented Feb 10, 2013

It should fix #2816 (and #2827 which is a duplicate).

@lesteve
Copy link
Contributor Author

lesteve commented Feb 26, 2013

Could maybe @wesm or @changhiskhan have a quick look at this one? I seem to remember the promise this would be fixed for the next release on the mailing list.

More than happy to change anything as needed.

Also I seem to have enabled travis-ci after pushing this branch to my fork so that this branch was never tested. If that makes things easier and there is an easy way to force travis-ci to run on this branch let me know.

@ghost
Copy link

ghost commented Mar 25, 2013

There's a failing test:

λ nosetests ./pandas/tseries/tests/test_plotting.py:TestTSPlot.test_secondary_legend

======================================================================
FAIL: test_secondary_legend (pandas.tseries.tests.test_plotting.TestTSPlot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/user1/src/pandas/pandas/tseries/tests/test_plotting.py", line 832, in test_secondary_legend
    self.assert_(len(colors) == 4)
AssertionError: False is not true

If it's fixed, I'll merge this.

@lesteve
Copy link
Contributor Author

lesteve commented Mar 25, 2013

Hmm I thought I ran the tests and checked but apparently not. I'll take a look.

@ghost
Copy link

ghost commented Mar 25, 2013

Plot tests are usualy skipped due to slowness, you have to ask for them.

They were added to travis just a few days ago (tacked on to the LOCALE_OVERRIDE build).
or you can just do:

nosetests ./pandas/tseries/tests/test_plotting.py

@lesteve
Copy link
Contributor Author

lesteve commented Mar 26, 2013

To be honest, not sure whether that's the best way to do it but the problem was that the left and right axis have independent color cycles which matters when you plot timeseries without any color or style arguments. In the failing test case you ended up having two blue and two green lines instead of the expected blue, green, red, cyan lines.

Any better work-around I am interested.

@ghost
Copy link

ghost commented Mar 26, 2013

Good enough for me.
Can you add a commit with a note in RELEASE.rst?

@hayd
Copy link
Contributor

hayd commented Mar 28, 2013

This fix works great.

@hayd hayd closed this Mar 28, 2013
@hayd
Copy link
Contributor

hayd commented Mar 28, 2013

merged

@lesteve
Copy link
Contributor Author

lesteve commented Mar 28, 2013

great, thanks for this and sorting out the merge conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatic color cycling when plotting consecutive timeseries without arguments disappeared in 0.8.1
2 participants