oneworld.StaticMap.add_legend

StaticMap.add_legend(marker, legend_pos, plt_kwargs, legend_kwargs)

Add a legend to the map.

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

Parameters:
  • marker (str) – Shape of marker to use. See https://matplotlib.org/3.2.1/api/markers_api.html

  • legend_pos ({'best', 'upper right', 'upper left', 'lower left', 'lower right', 'right', 'center left', 'center right', 'lower center', 'upper center', 'center'}) – Only relevant when legend_show is True. Position of the legend (Default: ‘lower center’).

  • plt_kwargs (dict) – Dict with extra args to pass to the plot function (Default: {}).

  • leg_kwargs (dict) – Dict with extra args to pass to the legend function (Default: {}).

See also

add_colorbar