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
Turn GeoAxes.outline_patch into a GeoSpine. #1213
Conversation
78fb562
to
bbb0825
Compare
Small amendment; I decided to override the two public methods of |
This patch deprecates GeoAxes.outline_patch as well, since the spine machinery works fine for what we want to do. The dictionary key is 'geo' to match the one used by the Matplotlib GeoAxes. The GeoSpine is a minimal implementation to have it work as it did before, but more things may be implemented in the future if necessary. Since PathPatch has default line width of 1.0, and spines have default line width of 0.8, some boundary lines have changed slightly in the test images.
bbb0825
to
fbc8de2
Compare
|
||
""" | ||
axes = event.axes | ||
# trigger the outline and background patches to be re-clipped | ||
axes.outline_patch.reclip = True | ||
axes.spines['geo'].stale = True |
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.
The docstring only talks about forcing the background patch to be reclipped. Do we really need to set stale here?
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.
Originally, no matter which had reclip=True
, both would be updated. Setting stale
now is equivalent to setting what reclip
did except each thing happens independently.
It doesn't seem like this is necessary now (at least from tests) and I don't remember exactly why I left it, but I believe this will be necessary when backgroud_patch
is removed. I will try again when I get to working on that once more.
Rationale
This patch deprecates
GeoAxes.outline_patch
as well, since the spine machinery works fine for what we want to do. The dictionary key is 'geo' to match the one used by the MatplotlibGeoAxes
.The
GeoSpine
is a minimal implementation to have it work as it did before, but more things may be implemented in the future if necessary.Since
PathPatch
has default line width of 1.0, and spines have default line width of 0.8, some boundary lines have changed slightly in the test images.Implications
Fixes #1077.
Fixes #829.
First step towards fixing up #1207.