ewatercycle.analysis ==================== .. py:module:: ewatercycle.analysis .. autoapi-nested-parse:: ewatercycle analysis module. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/ewatercycle/analysis/hydrograph/index Package Contents ---------------- .. py:function:: hydrograph(discharge: pandas.DataFrame | pandas.Series | xarray.DataArray | xarray.Dataset, *, reference: str, precipitation: pandas.DataFrame | pandas.Series | xarray.DataArray | xarray.Dataset | None = None, dpi: int | None = None, title: str | None = None, discharge_units: str = 'm$^3$ s$^{-1}$', precipitation_units: str = 'mm day$^{-1}$', figsize: tuple[float, float] = (10, 10), filename: os.PathLike | str | None = None, nbars: int | None = None, metrics_list: list[object] | None = None, selected_year: int | None = None, **kwargs) -> tuple[matplotlib.figure.Figure, tuple[matplotlib.axes.Axes, matplotlib.axes.Axes]] Plot a hydrograph. This utility function makes it convenient to create a hydrograph from a set of discharge data from a `pandas.DataFrame` or `xarray.Dataset`. A column must be marked as the reference, so that the agreement metrics can be calculated. Optionally, the corresponding precipitation data can be plotted for comparison. :param discharge: Data containing time series of discharge data to be plotted. :param reference: Name of the reference data, must correspond to a column in the discharge dataframe. Metrics are calculated between the reference column and each of the other columns. :param precipitation: Optional dataframe containing time series of precipitation data to be plotted from the top of the hydrograph. :param dpi: DPI for the plot. :param title: Title of the hydrograph. :param discharge_units: Units for the discharge data. :param precipitation_units: Units for the precipitation data. :param figsize: With, height of the plot in inches. :param filename: If specified, a copy of the plot will be saved to this path. :param nbars: Number of bars to use for downsampling precipitation. :param metrics_list: List of metrics to calculate and display in the table below the hydrograph. If not specified, a default set of metrics is used. :param selected_year: Slices a single year from the data :param \*\*kwargs: Options to pass to the matplotlib plotting function :returns: First tuple member is a matplotlib figure, the second is a tuple of axes.