foehnix.analysis_plots.tsplot

foehnix.analysis_plots.tsplot(fmm, start=None, end=None, ndays=10, tscontrol=None, showplot=True, show_n_plots=3, saveplot=False, savedir='', savefilename='foehnix_timeseries.png', userdict=None, **kwargs)[source]

Time series plot for foehnix models

Parameters:
fmm : foehnix.Foehnix

A foehnix mixture model object

start : str or Datetime timestamp

First day to plot. Will be converted to a timestamp, if possible. Must be within the daterange of fmm.data.

end : str or Datetime timestamp

Last day to fully plot. Will be converted to a timestamp, if possible. Must be within the daterange of fmm.data.

ndays : int

Number of days which one plot shows. Default 10.

tscontrol : foehnix.analysis_plots.TSControl object

Can be predefined before calling this function or else will be initialized if None (default).

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.

show_n_plots : int

How many figures will be opened, default is 1. After closing all, the next ones will be opened.

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_timeseries.pdf” to save the plots as PDF.

userdict : dict

alternative plotting parameters (variable names, colors, labels) which will be passed to TSControl. See foehnix.analysis_plots.TSControl for more details. If a suitable tscontrol argument is provided this dict will be ignored.

kwargs

will be passed to TSControl and can be used to rename the variable names of the fmm.data DataFrame. See foehnix.analysis_plots.TSControl for more details. If a suitable tscontrol argument is provided these argumetns will be ignored.