xoa.plot.setup_map_axes

Contents

xoa.plot.setup_map_axes#

xoa.plot.setup_map_axes(ax, extent=None, transform=None, gridlines=None, gridlines_labels_on=None, land=None, land_scale=None, coastlines=None, layer=None, bbox=None, fancy=None, **kwargs)#

Decorate a cartopy axes

The default values of the parameters that are None come from the plot.map_<name> options, like plot.map_gridlines.

Parameters:
  • ax (cartopy.mpl.geoaxes.GeoAxes)

  • extent (None, list) – Extent [xmin, xmax, ymin, ymax] in degrees, as returned by xoa.geo.get_extent()

  • transform (None, cartopy.crs.CRS) – Coordinate system of the extent, which defaults to PlateCarree

  • gridlines (None, bool) – Add labelled gridlines

  • gridlines_labels_on (None, list(str)) – Sides on which labels are drawn

  • land (None, bool) – Add the land with add_land()

  • land_scale (None, str)

  • coastlines (None, bool) – Add the coastlines

  • layer (None, bool, str) – Add a background layer with add_layer(), whose name may be given

  • bbox (None, bool) – Keep the frame of the axes visible

  • fancy (None, bool, dict) – Add a black and white frame with add_fancy_map_frame(). A dict gives its parameters.

  • kwargs – Extra parameters starting with "gridlines_" are passed to cartopy.mpl.geoaxes.GeoAxes.gridlines().

Returns:

cartopy.mpl.geoaxes.GeoAxes