Skip to content

Fix #6773: Don't do image extent adjustment... #6776

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 4 commits into from

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Jul 17, 2016

...on non-rectilinear axes

@mdboom mdboom added this to the 2.0 (style change major release) milestone Jul 17, 2016
@QuLogic
Copy link
Member

QuLogic commented Jul 17, 2016

I don't know if I'm running this PR wrong, but it seems like the Cartopy result is the same here; though somehow Travis thinks differently. Will have to investigate later.

if (round_to_pixel_border and
t.is_affine and
# deliberate exact class match
type(self.axes) in (maxes.Axes, maxes._subplots.Subplot) and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mess up anything with wcaxes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might. We don't really have a good way to determine if the edges of the axes are going to be snapped or not, but I'm starting to think that just by specific class is not good enough.

@QuLogic
Copy link
Member

QuLogic commented Jul 27, 2016

OK, I've tested this one out now. It's not quite as expected, but it doesn't go over the edge now. But it seems like the snapping works in reverse now?

Expected:
gshhs_coastlines
vs. this PR:
result-gshhs_coastlines
from this test.

@mdboom
Copy link
Member Author

mdboom commented Aug 1, 2016

@QuLogic: What is the axes class used in your example. This fix uses the class of the Axes to determine whether it has rectilinear edges or not. I suspect that isn't good enough, and maybe we'll have to do something smarter here.

@QuLogic
Copy link
Member

QuLogic commented Aug 1, 2016

cartopy.mpl.geoaxes.GeoAxesSubplot

@mdboom
Copy link
Member Author

mdboom commented Oct 17, 2016

I'm changed the test to be on the Axes.patch, not the Axes class itself.

@QuLogic: How does this work for your use case?

@QuLogic
Copy link
Member

QuLogic commented Oct 24, 2016

This does fix the images in #6773, though it breaks Cartopy tests in the opposite way. That is, the image is now "too small", but I think it's actually more correct in that the image is no longer (ever so slightly) outside the expected border.

The example above still produces the white line on the right, but now I'm not sure if it's a bug in imshow or in the outline...

@NelleV NelleV added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Oct 29, 2016
@efiring
Copy link
Member

efiring commented Nov 21, 2016

I'm closing this because #7465 has been merged.

@efiring efiring closed this Nov 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. status: confirmed bug status: needs revision
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants