arctichoke.plot.time_series =========================== .. py:module:: arctichoke.plot.time_series Functions --------- .. autoapisummary:: arctichoke.plot.time_series.plot_time_series Module Contents --------------- .. py:function:: plot_time_series(dataset: (str, xarray.DataArray, xarray.Dataset), variable_id: str = None, plt_title: str = None, xlims: [str, str] = None, ylims: [float, float] = None, save_as: str = None, test: bool = False, **kwargs) Plot a time series of the dataset. Plots a time series of the given dataset for the given variable, if applicable. :param dataset: The dataset for which to make a plot. :type dataset: `str`, `xarray.DataArray`, `xarray.Dataset` :param variable_id: The name of the variable ID to plot. :type variable_id: `str` :param plt_title: The title to use for the plot. Default is `None`, which uses a default title for the plot. :type plt_title: `str`, `None`, optional :param xlims: The limits to use for the x-axis on the plot in the following format: - [x_min, x_max] where `x_min` and `x_max` are strings in the format `YYYY-MM-DD` Default is `None`, which expands the x-axis to include all the data. :type xlims: List of `float`, optional :param ylims: The limits to use for the y-axis on the plot in the following format: - [y_min, y_max] Default is `None`, which expands the y-axis to include all the data. :type ylims: List of `float`, optional :param save_as: The name of the file to which to save the plot. Default is `None`, which doesn't save the plot to a file. :type save_as: `str`, `None`, optional :param test: If `True`, the function exists before making a plot for use in testing. Default is `False`. :type test: `bool`, optional :param \*\*kwargs: Keyword arguments to pass to `xr.DataArray.plot()`. :returns: * If `test` == `False` -- `None` * If `test` == `True` -- dataset : `xarray.DataArray` .. rubric:: Examples >>> from arctichoke.dataset.field_mean import get_field_mean >>> fldmean_xr = get_field_mean('example_siconc_dataset.nc') >>> from arctichoke.plot.time_series import plot_time_series >>> plot_time_series(dataset = fldmean_xr, variable_id = 'siconc')