-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
area plots are causing my unit tests to fail #9161
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
@rockg Thanks for posting an image! That is indeed what the unit tests expect, but the legends are screwed up for me in the following way. Each of the three sub-plots has two elements in the legend instead of one -- they are weirdly duplicated, and I possibly blame my new development branch installation of matplotlib. If your legend in the first of your three sub-plots looks like this
then the one I see looks like this:
Similarly for the other two subplots. I detected this problem by failing the pandas unit-tests, and I've extracted from the failing unit tests this minimal (or at least smaller) example. |
My guess is matplotlib/matplotlib#3303 is the cause. |
@tacaswell Just to be clear, you are guessing that matplotlib/matplotlib#3303 caused the regression, not that it fixes the regression? |
Correct, I suspect that pandas is working around the issue of poly collections not having a proper legend handler and now that it has one, you are getting double legend entries. 3303 is a major new feature 😄 [edited to fix word-salad] |
ok, so this is a reverse-bug fix, e.g. when matplotlib 1.5 is out, pandas needs to compensate? |
Yes, but I think it should (eventually) result in simplification of your code. Can someone point me to where the relevant bit of code is and I can try to provide said compensation. |
can you provide a link? |
@tacaswell , @jreback |
I'm using the latest matplotlib and pandas. If you run the following code, do the legends look right to you? The unit tests don't like them.
The text was updated successfully, but these errors were encountered: