foehnix.analysis_plots.TSControl

class foehnix.analysis_plots.TSControl(fmm, userdict=None, **kwargs)[source]

Control object for the foehnix time series plot function.

Can be used to set variable names, colors and labels.

__init__(fmm, userdict=None, **kwargs)[source]

Initializes a control object instance.

Parameters:
fmm : foehnix.Foehnix

A foehnix mixture model object

userdict : dict

If provided will be used to overrule the default settings.

If a key is not provided, default values will be used. Each entry consists of 'key': ['varname', 'color', 'label'].

'varname' must be present in the DataFrame provided to the model.

'color' must be any valid matplotlib-colorstring

Possible keys and default values are:

  • 't': ['t', 'C3', 'air temperature [C]']
  • 'rh': ['rh', 'C2', 'relative humidity [%]']
  • 'diff_t': ['diff_t', 'C8', 'temperature difference [C]']
  • 'dd': ['dd', 'black', 'wind direction [deg]']
  • 'ff': ['ff', 'C0', 'wind speed [m/s]']
  • 'ffx': ['ffx', 'C4', 'gust speed [m/s]']
  • 'prob': [None, 'C6', 'probability']
kwargs :

Can be used to quickly change the name of parameters within the Dataframe. E.g. tsc = TSControl(fmm, ff='windspd') will initialize a default control but change the column name from ff to windspd. These keyword arguments can also directly passed to the main plotting function foehnix.analysis_plots.tsplot(). E.g.: tsplot(fmm, dd='winddir').

Methods

__init__(fmm[, userdict]) Initializes a control object instance.