foehnix.analysis_plots.image

foehnix.analysis_plots.image(fmm, fun='freq', deltat=None, deltad=7, cmap=<matplotlib.colors.LinearSegmentedColormap object>, contours=False, contour_color='k', contour_levels=10, contour_labels=False, clabel_format='%.2f', clabel_size=8, showplot=True, saveplot=False, savedir='', savefilename='foehnix_hovmoeller.png', **kwargs)[source]

foehnix Image Plot - Hovmoeller Diagram

This plots a Hovmoeller Diagram with aggregated days on the x-axis and aggregated time on the y-axis.

Parameters:
fmm : foehnix.Foehnix

A foehnix mixture model object

fun : str or custom function

Determines how to aggregate the Foehn probability Possible strings are:

  • 'freq': frequency of foehn occurrence (probability >= 0.5)
  • 'mean': mean probability
  • 'occ': absolute occurrence of foehn (probabiliy >= 0.5)
  • 'occ': absolute occurrence of no foehn (probabiliy < 0.5)
deltat : int

interval in seconds for time aggregation. Has to be a fraction of 86400 (24h in seconds). If None (default) the interval of the time series will be used.

deltad : int

interval in days for daily aggregation. Default is 7.

cmap : matplotlib.colormap

colormap to use for the Hovmoeller Diagram

contours : Bool

If True additional contour lines will be ploted. Default False.

contour_color : str

Color of the contour lines. Default ‘k’ for black.

contour_levels : float or sequence of floats

Default 10 will plot 10 contour levels. If a sequence is provided contour levels will be plotted at the sequence values.

contour_labels : bool

Default False. If True contour labels will be added.

clabel_format : str

Formatstring for the contour labels. Default "%.2f" Switch to "%.0f" to show no decimal digits.

clabel_size : int

Fontsize of the contour lables. Default 8.

showplot : bool

If True (default) plots will be shown. If False, they can be shown by the user with plt.show() at a later stage.

saveplot : bool

If False (default) plots will not be saved to disc If True, all plots will be saved to savedir which must be provided as well.

savedir : str

Path to a directory where the plots are saved to. Mandatory if saveplots=True.

savefilename : str

Filename of the saved plot. Will be extended by a running number if multiple plots are saved. Can be used to specify the file format: e.g. use “foehnix_hovmoeller.pdf” to save the plots as PDF.

kwargs :

Possible keyword arguments for the figure:

  • 'title'
  • 'ylabel'
  • 'xlabel'