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

OSX backend. 2D histograms are flipped vertically #3806

Merged
merged 1 commit into from
Nov 18, 2014

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Nov 17, 2014

This bug only exists on master but not in 1.4.2. Moreover this only happens on screen but is correct when saving the figure. I guess this relates to how the y-axis is inverted in images.

This can be seen by running api/power_norm_demo.py where the covariance is inverted.

The qt4/5 gtk3Agg and tkAgg are not affected.

OS x (screenshot)

screen shot 2014-11-16 at 17 55 25

OSX result (saved fig)
figure_1

In the docs:

power_norm_demo

@tacaswell tacaswell changed the title OSX backend. 2D histograms are inverted OSX backend. 2D histograms are flipped vertically Nov 16, 2014
@mdboom mdboom self-assigned this Nov 17, 2014
@mdboom
Copy link
Member

mdboom commented Nov 17, 2014

Thanks. I think this is probably related to the C++ refactor. Self-assigned and I'm now looking into it.

@mdboom
Copy link
Member

mdboom commented Nov 17, 2014

PR attached.

@mdboom
Copy link
Member

mdboom commented Nov 17, 2014

In short, the flipy function was moved when the C++ code was refactored, because it's stateful and requires unnecessary shuffling of the data. The backends are now responsible for dealing with the orientation of the images directly, but the MacOSX backend was not updated accordingly.

@jenshnielsen
Copy link
Member Author

Works as expected and resolves the bug thanks. Merging.

jenshnielsen added a commit that referenced this pull request Nov 18, 2014
OSX backend. 2D histograms are flipped vertically
@jenshnielsen jenshnielsen merged commit f05182d into matplotlib:master Nov 18, 2014
@mdboom mdboom deleted the image-orientation-macosx branch March 3, 2015 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants