Skip to content

Commit

Permalink
Pass options of stock_img to imshow
Browse files Browse the repository at this point in the history
  • Loading branch information
smartlixx committed Aug 6, 2023
1 parent a6c0835 commit 58883af
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/cartopy/mpl/geoaxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,12 +999,13 @@ def set_yticks(self, ticks, minor=False, crs=None):

return super().set_yticks(yticks, minor=minor)

def stock_img(self, name='ne_shaded'):
def stock_img(self, name='ne_shaded', **kwargs):
"""
Add a standard image to the map.
Currently, the only (and default) option is a downsampled version of
the Natural Earth shaded relief raster.
Currently, the only (and default) option for image is a downsampled version of
the Natural Earth shaded relief raster. Other options (e.g., alpha) will be
passed to func:`self.imshow`.
"""
if name == 'ne_shaded':
Expand All @@ -1014,7 +1015,8 @@ def stock_img(self, name='ne_shaded'):

return self.imshow(imread(fname), origin='upper',
transform=source_proj,
extent=[-180, 180, -90, 90])
extent=[-180, 180, -90, 90],
**kwargs)
else:
raise ValueError('Unknown stock image %r.' % name)

Expand Down

0 comments on commit 58883af

Please sign in to comment.