maps.styles.legends

Module Contents

Functions

colorbar(layer, *args[, shrink, aspect, ax])

Produce a colorbar for a given layer.

disjoint(layer, *args[, location, frameon])

Produce a disjoint legend for a given layer.

Attributes

DEFAULT_LEGEND_LABEL

maps.styles.legends.DEFAULT_LEGEND_LABEL = '{variable_name} ({units})'
maps.styles.legends.colorbar(layer, *args, shrink=0.8, aspect=35, ax=None, **kwargs)

Produce a colorbar for a given layer.

Parameters:
  • layer (earthkit.maps.charts.layers.Layer) – The layer for which to produce a colorbar.

  • **kwargs – Any keyword arguments accepted by matplotlib.figures.Figure.colorbar.

maps.styles.legends.disjoint(layer, *args, location='bottom', frameon=False, **kwargs)

Produce a disjoint legend for a given layer.

Parameters:
  • layer (earthkit.maps.charts.layers.Layer) – The layer for which to produce a colorbar.

  • **kwargs – Any keyword arguments accepted by matplotlib.figures.Figure.legend.