metobs_toolkit.dataset.Dataset.make_plot#
- Dataset.make_plot(obstype: str = 'temp', colorby: Literal['station', 'label'] = 'label', show_modeldata: bool = False, modelobstype: str = None, modeldata_kwargs: dict = {}, show_outliers: bool = True, show_gaps: bool = True, title: str | None = None, ax: Axes | None = None, figkwargs: dict = {}) Axes[source]#
Generate a time series plot for observational data.
- Parameters:
obstype (str, optional) – The type of observation to plot (e.g., “temp” for temperature). Default is “temp”.
modelobstype (str, optional) – The name of the ModelObstype to plot. It is only used if show_modeldata is True. If None, it is set equal to obstype. The default is None.
colorby ({"station", "label"}, optional) –
Determines how the data is colored in the plot.
”station”: Colors by station.
”label”: Colors by label (the labels refer to the status of a record).
Default is “label”.
show_modeldata (bool, optional) – If True, includes model data (of the same obstype) if present, in the plot. Default is False.
modeldata_kwargs (dict, optional) – Additional keyword arguments passed to Dataset.make_plot_of_modeldata(), by default an empty dictionary. Use it for example to specify modelname if multiple model data is available.
show_outliers (bool, optional) – If True, includes outliers (marked by the applied quality control) in the plot. Default is True.
show_gaps (bool, optional) – If True, gaps are represented by vertical lines in the plot if the gap is unfilled. If the gap is filled, it is plotted as a line. Default is True.
title (str or None, optional) – The title of the plot. If None, a default title is generated. Default is None.
ax (matplotlib.axes.Axes or None, optional) – The axes on which to draw the plot. If None, a new axes is created. Default is None.
figkwargs (dict, optional) – Additional keyword arguments passed to matplotlib.pyplot.subplots(), by default an empty dictionary.
- Returns:
The axes containing the plot.
- Return type:
matplotlib.axes.Axes