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

FIX: close the path on GeoSpines around the boundary #2186

Merged
merged 1 commit into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cartopy/mpl/geoaxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ def __init__(self, axes, **kwargs):
self._original_path = mpath.Path(np.empty((0, 2)))
kwargs.setdefault('clip_on', False)
super().__init__(axes, 'geo', self._original_path, **kwargs)
self.set_capstyle('butt')

def set_boundary(self, path, transform):
self._original_path = path
Expand All @@ -272,6 +271,7 @@ def set_boundary(self, path, transform):
def _adjust_location(self):
if self.stale:
self._path = self._original_path.clip_to_bbox(self.axes.viewLim)
self._path = mpath.Path(self._path.vertices, closed=True)

def get_window_extent(self, renderer=None):
# make sure the location is updated so that transforms etc are
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/cartopy/tests/mpl/test_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_web_tiles():

@pytest.mark.natural_earth
@pytest.mark.network
@pytest.mark.mpl_image_compare(filename='image_merge.png', tolerance=0.01)
@pytest.mark.mpl_image_compare(filename='image_merge.png', tolerance=0.03)
def test_image_merge():
# tests the basic image merging functionality
tiles = []
Expand Down
2 changes: 1 addition & 1 deletion lib/cartopy/tests/mpl/test_web_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@pytest.mark.filterwarnings("ignore:TileMatrixLimits")
@pytest.mark.network
@pytest.mark.skipif(not _OWSLIB_AVAILABLE, reason='OWSLib is unavailable.')
@pytest.mark.mpl_image_compare(filename='wmts.png', tolerance=0)
@pytest.mark.mpl_image_compare(filename='wmts.png', tolerance=0.03)
def test_wmts():
ax = plt.axes(projection=ccrs.PlateCarree())
url = 'https://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi'
Expand Down