polartoolkit.set_proj

Contents

polartoolkit.set_proj#

set_proj(region, hemisphere=None, epsg=None, fig_height=None, fig_width=None)[source]#

Gives GMT projection strings in project and geographic units, from region and figure height or width. Inspired from mrsiegfried/Venturelli2020-GRL.

Parameters:
  • region (tuple[float, float, float, float]) – region boundaries in format [xmin, xmax, ymin, ymax] in projected meters

  • hemisphere (str | None) – set projection based on β€œnorth” or β€œsouth” hemispheres, by default None

  • epsg (str | None) – set projection from EPSG code string (β€œ3031”), by default None

  • fig_height (float | None) – desired figure height in cm, by default is None

  • fig_width (float | None) – instead of using figure height, set the projection based on figure width in cm, by default is None

Returns:

returns a tuple of the following variables: proj, proj_latlon, fig_width, fig_height

Return type:

tuple[str, str | None, float, float]