regionmask.Regions.plot_regions¶
- Regions.plot_regions(ax=None, regions=None, add_label=True, label='number', line_kws=None, text_kws=None, subsample=None, label_multipolygon='largest')¶
plot map with with srex regions
- Parameters
ax (axes handle, optional) – If given, uses existing axes. If not given, creates a new axes. Note: in contrast to plot this does not create a cartopy axes.
regions (list of int or str | ‘all’, default: “all”) – Deprecated - subset regions before plotting, i.e. use r[regions].plot() instead of r.plot(regions=regions). Select the regions (by number, abbrev or name, can be mixed) that should be drawn.
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’.
line_kws (dict, optional) – Arguments passed to plot.
text_kws (dict, optional) – Arguments passed to the labels (ax.text).
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.
label_multipolygon (‘largest’ | ‘all’, optional) – If ‘largest’ only adds a text label for the largest Polygon of a MultiPolygon. If ‘all’ adds text labels to all of them. Default: ‘largest’.
- Returns
ax (axes handle)