GeoAxes

class GeoAxes(*args: Any, **kwargs: Any)[source]

Bases: _SharedAxes, PlotAxes

Axes subclass for plotting in geographic projections. Uses either cartopy or basemap as a “backend”.

Note

This subclass uses longitude and latitude as the default coordinate system for all plotting commands by internally passing transform=cartopy.crs.PlateCarree() to cartopy commands and latlon=True to basemap commands. Also, when using basemap as the “backend”, plotting is still done “cartopy-style” by calling methods from the axes instance rather than the Basemap instance.

Important

This axes subclass can be used by passing proj='proj_name' to axes-creation commands like add_axes, add_subplot, and subplots, where proj_name is a registered PROJ projection name. You can also pass a Projection or Basemap instance instead of a projection name. Alternatively, you can pass any of the matplotlib-recognized axes subclass names proj='cartopy', proj='geo', or proj='geographic' with a Projection map_projection keyword argument, or pass proj='basemap' with a Basemap map_projection keyword argument.

Parameters:
  • *args – Passed to matplotlib.axes.Axes.

  • map_projection (Projection or Basemap) – The cartopy or basemap projection instance. This is passed automatically when calling axes-creation commands like add_subplot.

  • round (bool, default: rc['geo.round'] = True) – For polar cartopy axes only. Whether to bound polar projections with circles rather than squares. Note that outer gridline labels cannot be added to circle-bounded polar projections. When basemap is the backend this argument must be passed to Proj instead.

  • extent ({'globe', 'auto'}, default: rc['geo.extent'] = 'globe') – For cartopy axes only. Whether to auto adjust the map bounds based on plotted content. If 'globe' then non-polar projections are fixed with set_global, non-Gnomonic polar projections are bounded at the equator, and Gnomonic polar projections are bounded at 30 degrees latitude. If 'auto' nothing is done.

  • lonlim, latlim (2-tuple of float, optional) – For cartopy axes only. The approximate longitude and latitude boundaries of the map, applied with set_extent. When basemap is the backend this argument must be passed to Proj instead.

  • boundinglat (float, optional) – For cartopy axes only. The edge latitude for the circle bounding North Pole and South Pole-centered projections. When basemap is the backend this argument must be passed to Proj instead.

  • longrid, latgrid, grid (bool, default: rc.grid = True) – Whether to draw longitude and latitude gridlines. Use the keyword grid to toggle both at once.

  • longridminor, latgridminor, gridminor (bool, default: rc.gridminor = False) – Whether to draw “minor” longitude and latitude lines. Use the keyword gridminor to toggle both at once.

  • lonticklen, latticklen, ticklen (unit-spec, default: rc['tick.len'] = 4.0) – Major tick lengths for the longitudinal (x) and latitude (y) axis. If float, units are points. If string, interpreted by units. Use the keyword ticklen to set both at once.

  • latmax (float, default: 80) – The maximum absolute latitude for gridlines. Longitude gridlines are cut off poleward of this value (note this feature does not work in cartopy 0.18).

  • nsteps (int, default: rc['grid.nsteps'] = 250) – For cartopy axes only. The number of interpolation steps used to draw gridlines.

  • lonlines, latlines (optional) – Aliases for lonlocator, latlocator.

  • lonlocator, latlocator (locator-spec, optional) – Used to determine the longitude and latitude gridline locations. Passed to the Locator constructor. Can be string, float, list of float, or matplotlib.ticker.Locator instance.

    For basemap or cartopy < 0.18, the defaults are 'deglon' and 'deglat', which correspond to the LongitudeLocator and LatitudeLocator locators (adapted from cartopy). For cartopy >= 0.18, the defaults are 'dmslon' and 'dmslat', which uses the same locators with dms=True. This selects gridlines at nice degree-minute-second intervals when the map extent is very small.

  • lonlines_kw, latlines_kw (optional) – Aliases for lonlocator_kw, latlocator_kw.

  • lonlocator_kw, latlocator_kw (dict-like, optional) – Keyword arguments passed to the matplotlib.ticker.Locator class.

  • lonminorlocator, latminorlocator, lonminorlines, latminorlines (optional) – As with lonlocator and latlocator but for the “minor” gridlines.

  • lonminorlines_kw, latminorlines_kw (optional) – Aliases for lonminorlocator_kw, latminorlocator_kw.

  • lonminorlocator_kw, latminorlocator_kw (optional) – As with lonlocator_kw, and latlocator_kw but for the “minor” gridlines.

  • lonlabels, latlabels, labels (str, bool, or sequence, rc['grid.labels'] = False) – Whether to add non-inline longitude and latitude gridline labels, and on which sides of the map. Use the keyword labels to set both at once. The argument must conform to one of the following options:

    • A boolean. True indicates the bottom side for longitudes and the left side for latitudes, and False disables all labels.

    • A string or sequence of strings indicating the side names, e.g. 'top' for longitudes or ('left', 'right') for latitudes.

    • A string indicating the side names with single characters, e.g. 'bt' for longitudes or 'lr' for latitudes.

    • A string matching 'neither' (no labels), 'both' (equivalent to 'bt' for longitudes and 'lr' for latitudes), or 'all' (equivalent to 'lrbt', i.e. all sides).

    • A boolean 2-tuple indicating whether to draw labels on the (bottom, top) sides for longitudes, and the (left, right) sides for latitudes.

    • A boolean 4-tuple indicating whether to draw labels on the (left, right, bottom, top) sides, as with the basemap drawmeridians() and drawparallels() labels keyword.

  • loninline, latinline, inlinelabels (bool, default: rc['grid.inlinelabels'] = False) – For cartopy axes only. Whether to add inline longitude and latitude gridline labels. Use the keyword inlinelabels to set both at once.

  • rotatelabels (bool, default: rc['grid.rotatelabels'] = False) – For cartopy axes only. Whether to rotate non-inline gridline labels so that they automatically follow the map boundary curvature.

  • labelrotation (float, optional) – The rotation angle in degrees for both longitude and latitude tick labels. Use lonlabelrotation and latlabelrotation to set them separately.

  • lonlabelrotation (float, optional) – The rotation angle in degrees for longitude tick labels. Works for both cartopy and basemap backends.

  • latlabelrotation (float, optional) – The rotation angle in degrees for latitude tick labels. Works for both cartopy and basemap backends.

  • labelpad (unit-spec, default: rc['grid.labelpad'] = 3.0) – For cartopy axes only. The padding between non-inline gridline labels and the map boundary. If float, units are points. If string, interpreted by units.

  • dms (bool, default: rc['grid.dmslabels'] = True) – For cartopy axes only. Whether the default locators and formatters should use “minutes” and “seconds” for gridline labels on small scales rather than decimal degrees. Setting this to False is equivalent to ax.format(lonlocator='deglon', latlocator='deglat') and ax.format(lonformatter='deglon', latformatter='deglat').

  • lonformatter, latformatter (formatter-spec, optional) – Formatter used to style longitude and latitude gridline labels. Passed to the Formatter constructor. Can be string, list of string, or matplotlib.ticker.Formatter instance.

    For basemap or cartopy < 0.18, the defaults are 'deglon' and 'deglat', which correspond to SimpleFormatter presets with degree symbols and cardinal direction suffixes. For cartopy >= 0.18, the defaults are 'dmslon' and 'dmslat', which uses cartopy’s LongitudeFormatter and LatitudeFormatter formatters with dms=True. This formats gridlines that do not fall on whole degrees as “minutes” and “seconds” rather than decimal degrees. Use dms=False to disable this.

  • lonformatter_kw, latformatter_kw (dict-like, optional) – Keyword arguments passed to the matplotlib.ticker.Formatter class.

  • land, ocean, coast, rivers, lakes, borders, innerborders (bool, optional) – Toggles various geographic features. These are actually the rc.land, rc.ocean, rc.coast, rc.rivers, rc.lakes, rc.borders, and rc.innerborders settings passed to context. The style can be modified using additional rc settings.

    For example, to change rc['land.color'], use ax.format(landcolor='green'), and to change rc['land.zorder'], use ax.format(landzorder=4).

  • reso ({'lo', 'med', 'hi', 'x-hi', 'xx-hi'}, optional) – For cartopy axes only. The resolution of geographic features. When basemap is the backend this must be passed to Proj instead.

  • color (color-spec, default: rc['meta.color'] = 'black') – The color for the axes edge. Propagates to labelcolor unless specified otherwise (similar to format()).

  • gridcolor (color-spec, default: rc['grid.color'] = 'black') – The color for the gridline labels.

  • labelcolor (color-spec, default: color or rc['grid.labelcolor'] = 'black') – The color for the gridline labels (gridlabelcolor is also allowed).

  • labelsize (unit-spec or str, default: rc['grid.labelsize'] = 'medium') – The font size for the gridline labels (gridlabelsize is also allowed). If float, units are points. If string, interpreted by units.

  • labelweight (str, default: rc['grid.labelweight'] = 'normal') – The font weight for the gridline labels (gridlabelweight is also allowed).

Other Parameters:
  • title (str or sequence, optional) – The axes title. Can optionally be a sequence strings, in which case the title will be selected from the sequence according to number.

  • abc (bool or str or sequence, default: rc.abc = False) – The “a-b-c” subplot label style. Must contain the character a or A, for example 'a.', or 'A'. If True then the default style of 'a' is used. The a or A is replaced with the alphabetic character matching the number. If number is greater than 26, the characters loop around to a, …, z, aa, …, zz, aaa, …, zzz, etc. Can also be a sequence of strings, in which case the “a-b-c” label will be selected sequentially from the list. For example axs.format(abc = ["X", "Y"]) for a two-panel figure, and axes[3:5].format(abc = ["X", "Y"]) for a two-panel subset of a larger figure.

  • abcloc, titleloc (str, default: rc['abc.loc'] = 'left', rc['title.loc'] = 'center') – Strings indicating the location for the a-b-c label and main title. The following locations are valid:

    Location

    Valid keys

    center above axes

    'center', 'c'

    left above axes

    'left', 'l'

    right above axes

    'right', 'r'

    lower center inside axes

    'lower center', 'lc'

    upper center inside axes

    'upper center', 'uc'

    upper right inside axes

    'upper right', 'ur'

    upper left inside axes

    'upper left', 'ul'

    lower left inside axes

    'lower left', 'll'

    lower right inside axes

    'lower right', 'lr'

    left of y axis

    'outer left', 'ol'

    right of y axis

    'outer right', 'or'

  • abcborder, titleborder (bool, default: rc['abc.border'] = True and rc['title.border'] = True) – Whether to draw a white border around titles and a-b-c labels positioned inside the axes. This can help them stand out on top of artists plotted inside the axes.

  • abcbbox, titlebbox (bool, default: rc['abc.bbox'] = False and rc['title.bbox'] = False) – Whether to draw a white bbox around titles and a-b-c labels positioned inside the axes. This can help them stand out on top of artists plotted inside the axes.

  • abcpad (float or unit-spec, default: rc['abc.pad']) – Horizontal offset to shift the a-b-c label position. Positive values move the label right, negative values move it left. This is separate from abctitlepad, which controls spacing between abc and title when co-located. If float, units are points. If string, interpreted by units.

  • abc_kw, title_kw (dict-like, optional) – Additional settings used to update the a-b-c label and title with text.update().

  • titlepad (float, default: rc['title.pad'] = 5.0) – The padding for the inner and outer titles and a-b-c labels. If float, units are points. If string, interpreted by units.

  • titleabove (bool, default: rc['title.above'] = True) – Whether to try to put outer titles and a-b-c labels above panels, colorbars, or legends that are above the axes.

  • abctitlepad (float, default: rc['abc.titlepad'] = 4.0) – The horizontal padding between a-b-c labels and titles in the same location. If float, units are points. If string, interpreted by units.

  • ltitle, ctitle, rtitle, ultitle, uctitle, urtitle, lltitle, lctitle, lrtitle (str or sequence, :py:class:`optional `) – Shorthands for the below keywords. lefttitle, centertitle, righttitle, upperlefttitle, uppercentertitle, upperrighttitle : str or sequence, optional

  • lowerlefttitle, lowercentertitle, lowerrighttitle (str or sequence, optional) – Additional titles in specific positions (see title for details). This works as an alternative to the ax.format(title='Title', titleloc=loc) workflow and permits adding more than one title-like label for a single axes.

  • a, alpha, fc, facecolor, ec, edgecolor, lw, linewidth, ls, linestyle (**default* *) – rc['axes.alpha'] = None (default: 1.0), rc['axes.facecolor'] = 'white' (default: white), rc['axes.edgecolor'] = 'black' (default: black), rc['axes.linewidth'] = 0.6 (default: 0.6), - Additional settings applied to the background patch, and their shorthands. Their defaults values are the 'axes' properties.

  • rc_mode (int, optional) – The context mode passed to context.

  • rc_kw (dict-like, optional) – An alternative to passing extra keyword arguments. See below.

  • **kwargs – Remaining keyword arguments are passed to matplotlib.axes.Axes.n Keyword arguments that match the name of an rc setting are passed to ultraplot.config.Configurator.context and used to update the axes. If the setting name has “dots” you can simply omit the dots. For example, abc='A.' modifies the rc.abc setting, titleloc='left' modifies the rc['title.loc'] setting, gridminor=True modifies the rc.gridminor setting, and gridbelow=True modifies the rc['grid.below'] setting. Many of the keyword arguments documented above are internally applied by retrieving settings passed to context.

Attributes Summary

gridlines_major

The cartopy Gridliner used for major gridlines or a 2-tuple containing the (longitude, latitude) major gridlines returned by basemap's drawmeridians() and drawparallels().

gridlines_minor

The cartopy Gridliner used for minor gridlines or a 2-tuple containing the (longitude, latitude) minor gridlines returned by basemap's drawmeridians() and drawparallels().

projection

The cartopy Projection or basemap Basemap instance associated with this axes.

Methods Summary

draw([renderer])

Draw the Artist (and its children) using the given renderer.

format()

Modify map limits, longitude and latitude gridlines, geographic features, and more.

set(*[, adjustable, agg_filter, alpha, ...])

Set multiple properties at once.

tick_params(*args, **kwargs)

Apply tick parameters and mirror a subset of settings onto the backend gridliner artists so gridline labels respond to common tick tweaks.

Attributes Documentation

gridlines_major

The cartopy Gridliner used for major gridlines or a 2-tuple containing the (longitude, latitude) major gridlines returned by basemap’s drawmeridians() and drawparallels(). This can be used for customization and debugging.

gridlines_minor

The cartopy Gridliner used for minor gridlines or a 2-tuple containing the (longitude, latitude) minor gridlines returned by basemap’s drawmeridians() and drawparallels(). This can be used for customization and debugging.

projection

The cartopy Projection or basemap Basemap instance associated with this axes.

Methods Documentation

draw(renderer: Any = None, *args: Any, **kwargs: Any) None[source]

Draw the Artist (and its children) using the given renderer.

This has no effect if the artist is not visible (Artist.get_visible returns False).

Parameters:

renderer (RendererBase subclass.)

Notes

This method is overridden in the Artist subclasses.

format() None[source]

Modify map limits, longitude and latitude gridlines, geographic features, and more.

Parameters:
  • round (bool, default: rc['geo.round'] = True) – For polar cartopy axes only. Whether to bound polar projections with circles rather than squares. Note that outer gridline labels cannot be added to circle-bounded polar projections. When basemap is the backend this argument must be passed to Proj instead.

  • extent ({'globe', 'auto'}, default: rc['geo.extent'] = 'globe') – For cartopy axes only. Whether to auto adjust the map bounds based on plotted content. If 'globe' then non-polar projections are fixed with set_global, non-Gnomonic polar projections are bounded at the equator, and Gnomonic polar projections are bounded at 30 degrees latitude. If 'auto' nothing is done.

  • lonlim, latlim (2-tuple of float, optional) – For cartopy axes only. The approximate longitude and latitude boundaries of the map, applied with set_extent. When basemap is the backend this argument must be passed to Proj instead.

  • boundinglat (float, optional) – For cartopy axes only. The edge latitude for the circle bounding North Pole and South Pole-centered projections. When basemap is the backend this argument must be passed to Proj instead.

  • longrid, latgrid, grid (bool, default: rc.grid = True) – Whether to draw longitude and latitude gridlines. Use the keyword grid to toggle both at once.

  • longridminor, latgridminor, gridminor (bool, default: rc.gridminor = False) – Whether to draw “minor” longitude and latitude lines. Use the keyword gridminor to toggle both at once.

  • lonticklen, latticklen, ticklen (unit-spec, default: rc['tick.len'] = 4.0) – Major tick lengths for the longitudinal (x) and latitude (y) axis. If float, units are points. If string, interpreted by units. Use the keyword ticklen to set both at once.

  • latmax (float, default: 80) – The maximum absolute latitude for gridlines. Longitude gridlines are cut off poleward of this value (note this feature does not work in cartopy 0.18).

  • nsteps (int, default: rc['grid.nsteps'] = 250) – For cartopy axes only. The number of interpolation steps used to draw gridlines.

  • lonlines, latlines (optional) – Aliases for lonlocator, latlocator.

  • lonlocator, latlocator (locator-spec, optional) – Used to determine the longitude and latitude gridline locations. Passed to the Locator constructor. Can be string, float, list of float, or matplotlib.ticker.Locator instance.

    For basemap or cartopy < 0.18, the defaults are 'deglon' and 'deglat', which correspond to the LongitudeLocator and LatitudeLocator locators (adapted from cartopy). For cartopy >= 0.18, the defaults are 'dmslon' and 'dmslat', which uses the same locators with dms=True. This selects gridlines at nice degree-minute-second intervals when the map extent is very small.

  • lonlines_kw, latlines_kw (optional) – Aliases for lonlocator_kw, latlocator_kw.

  • lonlocator_kw, latlocator_kw (dict-like, optional) – Keyword arguments passed to the matplotlib.ticker.Locator class.

  • lonminorlocator, latminorlocator, lonminorlines, latminorlines (optional) – As with lonlocator and latlocator but for the “minor” gridlines.

  • lonminorlines_kw, latminorlines_kw (optional) – Aliases for lonminorlocator_kw, latminorlocator_kw.

  • lonminorlocator_kw, latminorlocator_kw (optional) – As with lonlocator_kw, and latlocator_kw but for the “minor” gridlines.

  • lonlabels, latlabels, labels (str, bool, or sequence, rc['grid.labels'] = False) – Whether to add non-inline longitude and latitude gridline labels, and on which sides of the map. Use the keyword labels to set both at once. The argument must conform to one of the following options:

    • A boolean. True indicates the bottom side for longitudes and the left side for latitudes, and False disables all labels.

    • A string or sequence of strings indicating the side names, e.g. 'top' for longitudes or ('left', 'right') for latitudes.

    • A string indicating the side names with single characters, e.g. 'bt' for longitudes or 'lr' for latitudes.

    • A string matching 'neither' (no labels), 'both' (equivalent to 'bt' for longitudes and 'lr' for latitudes), or 'all' (equivalent to 'lrbt', i.e. all sides).

    • A boolean 2-tuple indicating whether to draw labels on the (bottom, top) sides for longitudes, and the (left, right) sides for latitudes.

    • A boolean 4-tuple indicating whether to draw labels on the (left, right, bottom, top) sides, as with the basemap drawmeridians() and drawparallels() labels keyword.

  • loninline, latinline, inlinelabels (bool, default: rc['grid.inlinelabels'] = False) – For cartopy axes only. Whether to add inline longitude and latitude gridline labels. Use the keyword inlinelabels to set both at once.

  • rotatelabels (bool, default: rc['grid.rotatelabels'] = False) – For cartopy axes only. Whether to rotate non-inline gridline labels so that they automatically follow the map boundary curvature.

  • labelrotation (float, optional) – The rotation angle in degrees for both longitude and latitude tick labels. Use lonlabelrotation and latlabelrotation to set them separately.

  • lonlabelrotation (float, optional) – The rotation angle in degrees for longitude tick labels. Works for both cartopy and basemap backends.

  • latlabelrotation (float, optional) – The rotation angle in degrees for latitude tick labels. Works for both cartopy and basemap backends.

  • labelpad (unit-spec, default: rc['grid.labelpad'] = 3.0) – For cartopy axes only. The padding between non-inline gridline labels and the map boundary. If float, units are points. If string, interpreted by units.

  • dms (bool, default: rc['grid.dmslabels'] = True) – For cartopy axes only. Whether the default locators and formatters should use “minutes” and “seconds” for gridline labels on small scales rather than decimal degrees. Setting this to False is equivalent to ax.format(lonlocator='deglon', latlocator='deglat') and ax.format(lonformatter='deglon', latformatter='deglat').

  • lonformatter, latformatter (formatter-spec, optional) – Formatter used to style longitude and latitude gridline labels. Passed to the Formatter constructor. Can be string, list of string, or matplotlib.ticker.Formatter instance.

    For basemap or cartopy < 0.18, the defaults are 'deglon' and 'deglat', which correspond to SimpleFormatter presets with degree symbols and cardinal direction suffixes. For cartopy >= 0.18, the defaults are 'dmslon' and 'dmslat', which uses cartopy’s LongitudeFormatter and LatitudeFormatter formatters with dms=True. This formats gridlines that do not fall on whole degrees as “minutes” and “seconds” rather than decimal degrees. Use dms=False to disable this.

  • lonformatter_kw, latformatter_kw (dict-like, optional) – Keyword arguments passed to the matplotlib.ticker.Formatter class.

  • land, ocean, coast, rivers, lakes, borders, innerborders (bool, optional) – Toggles various geographic features. These are actually the rc.land, rc.ocean, rc.coast, rc.rivers, rc.lakes, rc.borders, and rc.innerborders settings passed to context. The style can be modified using additional rc settings.

    For example, to change rc['land.color'], use ax.format(landcolor='green'), and to change rc['land.zorder'], use ax.format(landzorder=4).

  • reso ({'lo', 'med', 'hi', 'x-hi', 'xx-hi'}, optional) – For cartopy axes only. The resolution of geographic features. When basemap is the backend this must be passed to Proj instead.

  • color (color-spec, default: rc['meta.color'] = 'black') – The color for the axes edge. Propagates to labelcolor unless specified otherwise (similar to format()).

  • gridcolor (color-spec, default: rc['grid.color'] = 'black') – The color for the gridline labels.

  • labelcolor (color-spec, default: color or rc['grid.labelcolor'] = 'black') – The color for the gridline labels (gridlabelcolor is also allowed).

  • labelsize (unit-spec or str, default: rc['grid.labelsize'] = 'medium') – The font size for the gridline labels (gridlabelsize is also allowed). If float, units are points. If string, interpreted by units.

  • labelweight (str, default: rc['grid.labelweight'] = 'normal') – The font weight for the gridline labels (gridlabelweight is also allowed).

Other Parameters:
  • title (str or sequence, optional) – The axes title. Can optionally be a sequence strings, in which case the title will be selected from the sequence according to number.

  • abc (bool or str or sequence, default: rc.abc = False) – The “a-b-c” subplot label style. Must contain the character a or A, for example 'a.', or 'A'. If True then the default style of 'a' is used. The a or A is replaced with the alphabetic character matching the number. If number is greater than 26, the characters loop around to a, …, z, aa, …, zz, aaa, …, zzz, etc. Can also be a sequence of strings, in which case the “a-b-c” label will be selected sequentially from the list. For example axs.format(abc = ["X", "Y"]) for a two-panel figure, and axes[3:5].format(abc = ["X", "Y"]) for a two-panel subset of a larger figure.

  • abcloc, titleloc (str, default: rc['abc.loc'] = 'left', rc['title.loc'] = 'center') – Strings indicating the location for the a-b-c label and main title. The following locations are valid:

    Location

    Valid keys

    center above axes

    'center', 'c'

    left above axes

    'left', 'l'

    right above axes

    'right', 'r'

    lower center inside axes

    'lower center', 'lc'

    upper center inside axes

    'upper center', 'uc'

    upper right inside axes

    'upper right', 'ur'

    upper left inside axes

    'upper left', 'ul'

    lower left inside axes

    'lower left', 'll'

    lower right inside axes

    'lower right', 'lr'

    left of y axis

    'outer left', 'ol'

    right of y axis

    'outer right', 'or'

  • abcborder, titleborder (bool, default: rc['abc.border'] = True and rc['title.border'] = True) – Whether to draw a white border around titles and a-b-c labels positioned inside the axes. This can help them stand out on top of artists plotted inside the axes.

  • abcbbox, titlebbox (bool, default: rc['abc.bbox'] = False and rc['title.bbox'] = False) – Whether to draw a white bbox around titles and a-b-c labels positioned inside the axes. This can help them stand out on top of artists plotted inside the axes.

  • abcpad (float or unit-spec, default: rc['abc.pad']) – Horizontal offset to shift the a-b-c label position. Positive values move the label right, negative values move it left. This is separate from abctitlepad, which controls spacing between abc and title when co-located. If float, units are points. If string, interpreted by units.

  • abc_kw, title_kw (dict-like, optional) – Additional settings used to update the a-b-c label and title with text.update().

  • titlepad (float, default: rc['title.pad'] = 5.0) – The padding for the inner and outer titles and a-b-c labels. If float, units are points. If string, interpreted by units.

  • titleabove (bool, default: rc['title.above'] = True) – Whether to try to put outer titles and a-b-c labels above panels, colorbars, or legends that are above the axes.

  • abctitlepad (float, default: rc['abc.titlepad'] = 4.0) – The horizontal padding between a-b-c labels and titles in the same location. If float, units are points. If string, interpreted by units.

  • ltitle, ctitle, rtitle, ultitle, uctitle, urtitle, lltitle, lctitle, lrtitle (str or sequence, :py:class:`optional `) – Shorthands for the below keywords. lefttitle, centertitle, righttitle, upperlefttitle, uppercentertitle, upperrighttitle : str or sequence, optional

  • lowerlefttitle, lowercentertitle, lowerrighttitle (str or sequence, optional) – Additional titles in specific positions (see title for details). This works as an alternative to the ax.format(title='Title', titleloc=loc) workflow and permits adding more than one title-like label for a single axes.

  • a, alpha, fc, facecolor, ec, edgecolor, lw, linewidth, ls, linestyle (**default* *) – rc['axes.alpha'] = None (default: 1.0), rc['axes.facecolor'] = 'white' (default: white), rc['axes.edgecolor'] = 'black' (default: black), rc['axes.linewidth'] = 0.6 (default: 0.6), - Additional settings applied to the background patch, and their shorthands. Their defaults values are the 'axes' properties.

  • rowlabels, collabels, llabels, tlabels, rlabels, blabels – Aliases for leftlabels and toplabels, and for leftlabels, toplabels, rightlabels, and bottomlabels, respectively.

  • leftlabels, toplabels, rightlabels, bottomlabels (sequence of str, optional) – Labels for the subplots lying along the left, top, right, and bottom edges of the figure. The length of each list must match the number of subplots along the corresponding edge.

  • leftlabelpad, toplabelpad, rightlabelpad, bottomlabelpad (float or unit-spec, default )

  • rc['leftlabel.pad'] = 5.0, rc['toplabel.pad'] = 5.0, rc['rightlabel.pad'] = 5.0, rc['bottomlabel.pad'] = 5.0 – The padding between the labels and the axes content. If float, units are points. If string, interpreted by units.

  • leftlabels_kw, toplabels_kw, rightlabels_kw, bottomlabels_kw (dict-like, optional) – Additional settings used to update the labels with text.update().

  • figtitle – Alias for suptitle.

  • suptitle (str, optional) – The figure “super” title, centered between the left edge of the leftmost subplot and the right edge of the rightmost subplot.

  • suptitlepad (float, default: rc['suptitle.pad'] = 5.0) – The padding between the super title and the axes content. If float, units are points. If string, interpreted by units.

  • suptitle_kw (optional) – Additional settings used to update the super title with text.update().

  • includepanels (bool, default: False) – Whether to include panels when aligning figure “super titles” along the top of the subplot grid and when aligning the spanx x axis labels and spany y axis labels along the sides of the subplot grid.

  • rc_mode (int, optional) – The context mode passed to context.

  • rc_kw (dict-like, optional) – An alternative to passing extra keyword arguments. See below.

  • **kwargs – Keyword arguments that match the name of an rc setting are passed to ultraplot.config.Configurator.context and used to update the axes. If the setting name has “dots” you can simply omit the dots. For example, abc='A.' modifies the rc.abc setting, titleloc='left' modifies the rc['title.loc'] setting, gridminor=True modifies the rc.gridminor setting, and gridbelow=True modifies the rc['grid.below'] setting. Many of the keyword arguments documented above are internally applied by retrieving settings passed to context.

set(*, adjustable=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, anchor=<UNSET>, animated=<UNSET>, aspect=<UNSET>, autoscale_on=<UNSET>, autoscalex_on=<UNSET>, autoscaley_on=<UNSET>, axes_locator=<UNSET>, axisbelow=<UNSET>, box_aspect=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, external=<UNSET>, facecolor=<UNSET>, forward_navigation_events=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, mouseover=<UNSET>, navigate=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, prop_cycle=<UNSET>, rasterization_zorder=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, subplotspec=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xbound=<UNSET>, xlabel=<UNSET>, xlim=<UNSET>, xmargin=<UNSET>, xscale=<UNSET>, xticklabels=<UNSET>, xticks=<UNSET>, ybound=<UNSET>, ylabel=<UNSET>, ylim=<UNSET>, ymargin=<UNSET>, yscale=<UNSET>, yticklabels=<UNSET>, yticks=<UNSET>, zorder=<UNSET>)

Set multiple properties at once.

Supported properties are

Property

Description

adjustable

{‘box’, ‘datalim’}

agg_filter

a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image

alpha

float or None

anchor

(float, float) or {‘C’, ‘SW’, ‘S’, ‘SE’, ‘E’, ‘NE’, …}

animated

bool

aspect

{‘auto’, ‘equal’} or float

autoscale_on

bool

autoscalex_on

unknown

autoscaley_on

unknown

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

bool or ‘line’

box_aspect

float or None

clip_box

BboxBase or None

clip_on

bool

clip_path

Patch or (Path, Transform) or None

external

unknown

facecolor or fc

:mpltype:`color`

figure

Figure or SubFigure

forward_navigation_events

bool or “auto”

frame_on

bool

gid

str

in_layout

bool

label

object

mouseover

bool

navigate

bool

navigate_mode

unknown

path_effects

list of AbstractPathEffect

picker

None or bool or float or callable

position

[left, bottom, width, height] or Bbox

prop_cycle

Cycler

rasterization_zorder

float or None

rasterized

bool

sketch_params

(scale: float, length: float, randomness: float)

snap

bool or None

subplotspec

unknown

title

str

transform

Transform

url

str

visible

bool

xbound

(lower: float, upper: float)

xlabel

str

xlim

(left: float, right: float)

xmargin

float greater than -0.5

xscale

unknown

xticklabels

unknown

xticks

unknown

ybound

(lower: float, upper: float)

ylabel

str

ylim

(bottom: float, top: float)

ymargin

float greater than -0.5

yscale

unknown

yticklabels

unknown

yticks

unknown

zorder

float

tick_params(*args: Any, **kwargs: Any) Any[source]

Apply tick parameters and mirror a subset of settings onto the backend gridliner artists so gridline labels respond to common tick tweaks.