You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using certain projections such as cartopy.crs.AlbersEqualArea or cartopy.crs.Orthographic along with changing the extent such that some of the map is clipped, the spines at one corner do not form a connection or properly align. This is evident if you increase the line width of the spines. The image below shows the result in the affected corner which I have observed to be in both the top right corner as well as the lower left corner. The code below produced the plot this image was taken from.
It looks like the GeoSpine path isn't closed. @QuLogic do you know if there was a specific reason for not closing the path? It looks like you explicitly set the capstyle to "butt" in #1213
I suppose non-closure makes sense for normal Left/Right/Bottom/Top Spines, but are GeoSpines always loops and therefore closed?
@kerrycobb A workaround for your specific case, but I don't think is general, is to call ax.spines[:].set_capstyle("projecting").
Thanks @greglucas for the work around! That's a good solution for my current case.
I was thinking the same thing about the path not being closed because of the effect that I see if I set the joinstyle to round ax.spines[:].set_joinstyle("round"). It changes the joinstyle of just 3 corners.
I think that was just to match previous behaviour; the former PathPatch uses 'butt' cap style. Matplotlib's spines use 'projecting', so that would likely be more consistent. I would think that not closing the path is an oversight, but since that's used for the background as well, I'm a bit surprised that didn't seem to cause any other issues.
Description
When using certain projections such as cartopy.crs.AlbersEqualArea or cartopy.crs.Orthographic along with changing the extent such that some of the map is clipped, the spines at one corner do not form a connection or properly align. This is evident if you increase the line width of the spines. The image below shows the result in the affected corner which I have observed to be in both the top right corner as well as the lower left corner. The code below produced the plot this image was taken from.
Code to reproduce
Full environment definition
Operating system
macOS 11.3.1
Versions
Cartopy: 0.21.1
matplotlib: 3.7.1
The text was updated successfully, but these errors were encountered: