-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
hexbin log scale is broken in matplotlib 1.2.0 #1636
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
…rick" to reuse the polygons can't work, so revert to the old method where each polygon is independent.
@krakov: Which you mind testing the attached solution? |
@mdboom Good response time. Your solution produces expected output on my end. There are some minor PEP8 issues which I'll comment on inline. I've also milestoned this for v1.2.x. |
if xscale == 'log' or yscale == 'log': | ||
polygons = np.expand_dims(polygon, 0) + np.expand_dims(offsets, 1) | ||
if xscale == 'log': | ||
polygons[:,:,0] = 10.0 ** polygons[:,:,0] |
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.
PEP8: Spaces after commas in indices.
This is utterly ludicrous. Three of the four Travis negatives were false ones. I'm starting to reconsider the usefulness of Travis recently. The build scenarios for python versions 2.6, 2.7 and 3.1 were all false negatives. The log hexbin test for python 3.2 failed. This doesn't look like a false negative. |
The log hexbin test fails locally for me on py2.7. |
Duh. The random number generator needs to be seeded. Following that, all is well with the tests, as far as I can tell. |
Though it's probably not worth it, I'm going to hold on merging this until Travis finishes its testing. |
FYI: The new log hexbin test passes locally with py2.7. Thanks for the patch @mdboom! |
hexbin log scale is broken in matplotlib 1.2.0
Following code based on the hexbin demo on matplotlib site:
It produces a incorrect image on 1.2.0. When reverting hexbin implementation to that of 1.1.1 (with no other changes in 1.2.0 code) it produces a correct image.
I am using Windows 64-bit Python 2.7, with matplotlib-1.2.0.win-amd64-py2.7 package and Numpy-MKL, both from http://www.lfd.uci.edu/~gohlke/pythonlibs/. Since the revert to fix was in axes.py only I believe this was not specific to the matplotlib binary.