xoa.plot.add_compass

Contents

xoa.plot.add_compass#

xoa.plot.add_compass(ax, loc=None, size=None, style=None, pad=None, color=None, effect=None, effect_kw=None, zorder=None, **kwargs)[source]#

Add a compass to a map

The default values of the parameters that are None come from the plot.compass_<name> options.

The north points to the direction of the meridian at the position of the compass, which differs from the vertical in some projections. The angle is computed when the function is called.

Parameters:
  • ax (cartopy.mpl.geoaxes.GeoAxes)

  • loc (None, {"lower left", "lower right", "upper left", "upper right"}) – Corner of the axes where the compass is placed

  • size (None, float) – Height of the compass in points

  • style (None, {"simple", "fancy"}) – A single arrow, or a rose with four split points and a ring

  • pad (None, float) – Distance of the center to the corner in axes coordinates. By default, it leaves room for the arrow and the “N” inside the axes.

  • color (None, color) – Color of the dark parts and of the “N”

  • effect (None, bool, str, list(str)) – Add a "shadow", a "glow" or both, which are drawn below the artists to make them stand out. True is a shorthand for the shadow.

  • effect_kw (None, dict) – Parameters of the effects: the blur width in points, the alpha, the color and, for the shadow, the offset in points. Give a dict per effect to set them separately, like {"glow": {"color": "y"}}.

  • zorder (None, float)

  • kwargs – Extra parameters are passed to matplotlib.text.Text, like fontsize.

Returns:

list – The artists: the polygons, the ring of the fancy style and the “N”