Skip to content

Commit

Permalink
Fix wrong bounding box in _add_coastlines
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiodsf committed Jan 27, 2025
1 parent e38d71a commit 78bc176
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sourcespec/ssp_plot_stations.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,8 @@ def _add_coastlines(config, ax):
shpfile = shpreader.gshhs(coastline_resolution)
shp = shpreader.Reader(shpfile)
# bounding box of the axes to clip the coastlines
bbox = box(*ax.get_extent(ccrs.PlateCarree()))
lonmin, lonmax, latmin, latmax = ax.get_extent(ccrs.PlateCarree())
bbox = box(lonmin, latmin, lonmax, latmax)
with warnings.catch_warnings():
# silent a warning on:
# "Shapefile shape has invalid polygon: no exterior rings found"
Expand Down

0 comments on commit 78bc176

Please sign in to comment.