monet.plots.mapgen
Map utilities.
Functions
|
Draw a map with Cartopy. |
- monet.plots.mapgen.draw_map(*, crs=None, natural_earth=False, coastlines=True, states=False, counties=False, countries=True, resolution='10m', extent=None, figsize=(10, 5), linewidth=0.25, return_fig=False, **kwargs)
Draw a map with Cartopy.
- Parameters
crs (cartopy.crs.Projection) – The map projection. If set, this takes precedence over the possible
kwargs['subplot_kw']['projection']
. If unset (None
), defaults toccrs.PlateCarree()
.natural_earth (bool) – Add the Cartopy Natural Earth ocean, land, lakes, and rivers features.
coastlines (bool) – Add coastlines (linewidth applied).
states (bool) – Add states/provinces (linewidth applied).
counties (bool) – Add US counties (linewidth applied).
countries (bool) – Add country borders (linewidth applied).
resolution ({‘10m’, ‘50m’, ‘110m’}) – The resolution of the Natural Earth features for coastlines, states, and counties. The others are set automatically.
extent (array-like) – Set the map extent with
[lon_min,lon_max,lat_min,lat_max]
.figsize (tuple) – Figure size (width, height), passed to
plt.subplots()
. This takes precedence over the possiblekwargs['figsize']
.linewidth (float) – Line width for coastlines, states, counties, and countries.
return_fig (bool) – Return the figure and axes objects. By default (
False
), just the axes object is returned.**kwargs – Arguments to pass to
plt.subplots()
.
- Returns
By default, returns just the
ax
(cartopy.mpl.geoaxes.GeoAxes
instance). If return_fig is true, returnsfig, ax
.