pyguymer3.geo.add_annotation¶
- pyguymer3.geo.add_annotation(ax, locLon, locLat, annotation, /, *, arrowprops=None, bbox=None, color='black', debug=True, fontsize=8, horizontalalignment='center', prefix='.', txtLat=None, txtLon=None, txtOffsetX=None, txtOffsetY=None, verticalalignment='center', zorder=3.0)[source]¶
Add an annotation to a Cartopy axis.
- Parameters:
ax (cartopy.mpl.geoaxes.GeoAxesSubplot) – the axis to add the annotation to
locLon (float) – the longitude of the annotation location (in degrees)
locLat (float) – the latitude of the annotation location (in degrees)
annotation (str) – the annotation text
arrowprops (dict, optional) – the properties for the arrow connecting the annotation text to the annotation location
bbox (dict, optional) – the properties for the bounding box around the annotation text
color (str, optional) – the colour of the annotation text
debug (bool, optional) – print debug messages
fontsize (int, optional) – the font size of the annotation text
alignment (vertical) – the vertical alignment of the annotation text
prefix (str, optional) – change the name of the output debugging CSVs
txtLon (float, optional) – the longitude of the annotation text, which implies an arrow to connect it to the annotated location (in degrees)
txtLat (float, optional) – the latitude of the annotation text, which implies an arrow to connect it to the annotated location (in degrees)
txtOffsetX (int or float, optional) – the horizontal offset of the annotation text, which implies an arrow to connect it to the annotated location (in points)
txtOffsetY (int or float, optional) – the vertical offset of the annotation text, which implies an arrow to connect it to the annotated location (in points)
alignment – the vertical alignment of the annotation text
zorder (float, optional) – the zorder of the annotation text (the default value has been chosen to to match the value that it ends up being if the annotation text is not drawn with the zorder keyword specified – obtained by manual inspection on 16/Jun/2024)
Notes
Copyright 2017 Thomas Guymer [1]
References