regionmask.Regions.plot¶
-
Regions.
plot
(self, ax=None, proj=None, regions='all', add_label=True, label='number', coastlines=True, add_ocean=True, line_kws={}, text_kws={}, resolution='110m', subsample=None)¶ plot map with with region outlines
- Parameters
ax (axes handle, optional) – If given uses existing axes (needs to be a cartopy axes). If not given, creates a new axes with the specified projection.
proj (cartopy projection or None, optional) – Defines the projection of the map. If None uses ‘PlateCarree’. See cartopy home page. Default None.
regions (list of int or str | 'all', optional) – Select the regions (by number, abbrev or name, can be mixed) that should be outlined.
add_label (bool) – If true labels the regions. Optional, default True.
label ('number' | 'name' | 'abbrev', optional) – If ‘number’ labels the regions with numbers, if ‘name’ uses the long name of the regions, if ‘short_name’ uses abbreviations of the regions. Default ‘number’.
add_ocean (bool, optional) – If true colors the ocean blue. Default: True.
line_kws (dict) – Arguments passed to plot.
text_kws (dict) – Arguments passed to the labels (ax.text).
resolution ('110m' | '50m' | '10m') – Specify the resolution of the coastline and the ocean dataset. See cartopy for details.
subsample (None or bool, optional) – If True subsamples the outline of the coords to make better looking plots on certain maps. If False does not subsample. If None, infers the subsampling -> if the input is given as array subsamples if it is given as (Multi)Polygons does not subsample.
- Returns
ax (axes handle)
Note
plot internally calls
Regions.plot_regions()
.