Meteorographica.observations

This module is designed to make plots of observation positions, but they are basically just image maps, so the functions can be used for any scalar variable (with appropriate scaling).

It takes a cartopy.mpl.geoaxes.GeoAxes to draw into, and an pandas.DataFrame of observations. Then it’s just:

Meteorographica.observations.plot(geoaxes,dataframe,**options)

Only the observation positions are plotted.

See examples of use.


Meteorographica.observations.plot(ax, obs, **kwargs)[source]

Plot observations.

Generic function for plotting observations. Use the ‘type’ argument to choose the plot style.

Parameters:
Kwargs:

type (str, optional): Style to plot. Only option is: ‘patches’, (default) which delegates plotting to plot_patches().

Other keyword arguments are passed to the style-specific plotting function.

Returns:Nothing - adds the obs. points to the plot.

Meteorographica.observations.plot_patches(ax, obs, **kwargs)[source]

Plot observations as points.

Parameters:
Keyword Arguments:
 
  • obs_projection (cartopy.crs.CRS) – Projection in which observations latitudes and longitudes are defined. Default is cartopy.crs.PlateCarree.
  • lat_label (str) – Key, in the obs dataframe, of the latitude data. Defaults to ‘Latitude’.
  • lon_label (str) – Key, in the obs dataframe, of the longitude data. Defaults to ‘Longitude’.
  • radius (float) – Radius of circle marking each ob. (degrees). Defaults to 1.
  • facecolor (see matplotlib.colors) – Main colour of the circle to be plotted for each ob. Defaults to ‘yellow’.
  • edgecolor (see matplotlib.colors) – Border colour of the circle to be plotted for each ob. Defaults to ‘black’.
  • alpha (float) – Alpha value for facecolor and edgecolor. Defaults to 0.85. Will be multiplied by the observation weight if present.
  • zorder (float) – Standard matplotlib parameter determining which things are plotted on top (high zorder), and which underneath (low zorder), Defaults to 25.
Returns:

Nothing - adds the obs. points to the plot.