oneworld.StaticMap.add_colorbar

StaticMap.add_colorbar(legend_pos='lower center', cap_min=False, cap_max=False, cb_orient='vertical')

Add a colorbar to the map.

The added colorbar will contain information regarding the last data input. This method is called automatically when the legend_show parameter is set to True.

Parameters:
  • legend_pos ({'best', 'upper right', 'upper left', 'lower left', 'lower right', 'right', 'center left', 'center right', 'lower center', 'upper center', 'center'} or) – list or tuple Position of the colorbar. Can be one of the predefined positions, or a list or tuple of figure relative coordinates (x, y, width, height) Only relevant when legend_show is True. (Default: ‘lower center’).

  • cb_orient ({'horizontal', 'vertical'}) – Only relevant when legend_pos is a list or tuple containing coordinates and dimensions of the colorbar. Orientation of the colorbar (Default: ‘vertical’)

  • cap_min (float or int) – If set, all numerical values less than this value will have the same color. Ignored for categorical data (Default: False).

  • cap_max (float or int) – If set, all numerical values greater than this value will have the same color. Ignored for categorical data (Default: False).

See also

add_legend