metobs_toolkit.Modeldata.make_plot#

Modeldata.make_plot(obstype_model='temp', dataset=None, obstype_dataset=None, stationnames=None, starttime=None, endtime=None, title=None, show_outliers=True, show_filled=True, legend=True, _ax=None)[source]#

Plot timeseries of the modeldata.

This function creates a timeseries plot for the Modeldata. When a metobs_toolkit.Dataset is provided, it is plotted in the same figure.

The line colors represent the timesries for different locations.

Parameters:
  • obstype_model (string, optional) – Fieldname of the Modeldata to visualise. The default is ‘temp’.

  • dataset (metobs_toolkit.Dataset, optional) – A Dataset instance with observations plotted in the same figure. Observations are represented by solid line and modeldata by dashed lines. The default is None.

  • obstype_dataset (string, optional) – Fieldname of the Dataset to visualise. Only relevent when a dataset is provided. If None, obsype_dataset = obstype_model. The default is None.

  • stationnames (list, optional) – A list with stationnames to include in the timeseries. If None is given, all the stations are used, defaults to None.

  • starttime (datetime.datetime, optional) – Specifiy the start datetime for the plot. If None is given it will use the start datetime of the dataset, defaults to None.

  • endtime (datetime.datetime, optional) – Specifiy the end datetime for the plot. If None is given it will use the end datetime of the dataset, defaults to None.

  • title (string, optional) – Title of the figure, if None a default title is generated. The default is None.

  • show_outliers (bool, optional) – If true the observations labeld as outliers will be included in the plot. Only relevent when a dataset is provided. The default is True.

  • show_filled (bool, optional) – If true the filled values for gaps and missing observations will be included in the plot. Only relevent when a dataset is provided. The default is True.

  • legend (bool, optional) – If True, a legend is added to the plot. The default is True.

Returns:

axis – The timeseries axes of the plot is returned.

Return type:

matplotlib.pyplot.axes