regionmask.Regions.plot
- Regions.plot(*, ax=None, projection=None, add_label=True, label='number', add_coastlines=True, add_ocean=False, line_kws=None, text_kws=None, resolution='110m', subsample=None, add_land=False, coastline_kws=None, ocean_kws=None, land_kws=None, label_multipolygon='largest', tolerance='auto')
plot map with with region outlines
- Parameters:
ax (axes handle, optional) – If given uses existing axes (needs to be a cartopy GeoAxes). If not given, uses the current axes or creates a new axes with the specified projection.
projection (cartopy projection, default: None) – Defines the projection of the map. If None uses ‘PlateCarree’. See cartopy home page.
add_label (bool, default: True) – If true labels the regions.
label (‘number’ | ‘name’ | ‘abbrev’, default: ‘number’) – If ‘number’ labels the regions with numbers, if ‘name’ uses the long name of the regions, if ‘short_name’ uses abbreviations of the regions.
add_coastlines (bool, default: None) – If None or true plots coastlines. See coastline_kws.
add_ocean (bool, default: False) – If true adds the ocean feature. See ocean_kws.
line_kws (dict, default: None) – Arguments passed to plot.
text_kws (dict, default, None) – Arguments passed to the labels (ax.text).
resolution (‘110m’ | ‘50m’ | ‘10m’, default: ‘110m’) – Specify the resolution of the coastline and the ocean dataset. See cartopy for details.
add_land (bool, default: False) – If true adds the land feature. See land_kws.
coastline_kws (dict, default: None) – Arguments passed to
ax.coastlines()
. If None usescolor="0.4"
andlw=0.5
.ocean_kws (dict, default: None) – Arguments passed to
ax.add_feature(OCEAN)
. Per default uses the cartopy ocean color andzorder=0.9, lw=0
.land_kws (dict, default: None) – Arguments passed to
ax.add_feature(LAND)
. Per default uses the cartopy land color andzorder=0.9, lw=0
.label_multipolygon (‘largest’ | ‘all’, default: ‘largest’.) – If ‘largest’ only adds a text label for the largest Polygon of a MultiPolygon. If ‘all’ adds text labels to all of them.
tolerance (None | ‘auto’ | float, default: ‘auto’.) – Maximum length of drawn line segments. Can lead to better looking plots on certain maps.
None: draw original coordinates
float > 0: the maximum (euclidean) length of each line segment.
‘auto’: The tolerance is automatically determined based on the log10 of the largest absolute coordinate. Defaults to 1 for lat/ lon coordinates.
- Returns:
ax (axes handle)
Notes
plot internally calls
Regions.plot_regions()
.