Skip to content

Test nearest and none interpolation better #476

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

Merged
merged 3 commits into from
Sep 23, 2011

Conversation

jkseppan
Copy link
Member

Changes the baseline file image_interps.pdf to match the current
behavior of the code, and adds a new test for the difference between
"nearest" and "none" interpolation.

Fixes the problem reported at http://thread.gmane.org/gmane.comp.python.matplotlib.devel/10543

Request: I would like someone who works with the svg backend to check if the added test makes sense for svg and if the output looks good. It did look odd to me in Inkscape, but that might be an old version or misconfiguration. The idea of the test is that interpolation="none" should produce pixels of the same size, but interpolation="nearest" produces different-sized pixels with a suitable dpi setting.

jkseppan and others added 2 commits September 18, 2011 16:23
Changes the baseline file image_interps.pdf to match the current
behavior of the code, and adds a new test for the difference between
"nearest" and "none" interpolation.
…sn't like images with negative dimensions, so change to positive and adjust the offset accordingly.
@mdboom
Copy link
Member

mdboom commented Sep 20, 2011

I submitted a pull request to your branch that addresses the SVG issue. Inkscape does not seem to like images declared with negative dimensions, so I flipped the "height" dimension and adjusted the transform accordingly.

Fixes the SVG issues with "none" interpolation
@jkseppan
Copy link
Member Author

Thanks, merged the fix.

jkseppan added a commit that referenced this pull request Sep 23, 2011
Test nearest and none interpolation better
@jkseppan jkseppan merged commit 387d8fe into matplotlib:master Sep 23, 2011
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.

2 participants