rating_gp.plot#

Plotting functions

Classes

RatingPlotMixin()

Mixin plotting functions for Model class

class rating_gp.plot.RatingPlotMixin#

Mixin plotting functions for Model class

add_time_colorbar(ax: Axes | None = None, time_ticks: list[str | datetime] | None = None, **kwargs)#

Add a colorbar of the data time range to the figure.

Parameters:
  • ax (Axes, optional) – Pre-defined matplotlib axes.

  • time_ticks (list[str, datetime], optional) – List of times to place ticks on the colorbar.

Returns:

cbar – Generated matplotlib colorbar.

Return type:

Colorbar

plot_discharge(covariates: Dataset = None, ci: float = 0.95, ax: Axes | None = None)#

Plot predicted discharge versus time.

Parameters:
  • covariates (Dataset, optional) – Covariates.

  • ci (float, optional) – Confidence interval. The default is 0.95.

  • ax (Axes, optional) – Pre-defined matplotlib axes.

Returns:

ax – Generated matplotlib axes.

Return type:

Axes

plot_observed_rating(ax: Axes | None = None, **kwargs)#

Plot stage observations versus discharge observations.

Parameters:

ax (Axes, optional) – Pre-defined matplotlib axes.

Returns:

ax – Generated matplotlib axes.

Return type:

Axes

plot_rating(covariates: Dataset, ci: float = 0.95, ax: Axes | None = None, **kwargs)#

Plot predicted discharge versus stage.

Parameters:
  • covariates (Dataset) – Covariates.

  • ci (float, optional) – Confidence interval. The default is 0.95.

  • ax (Axes, optional) – Pre-defined matplotlib axes.

Returns:

ax – Generated matplotlib axes.

Return type:

Axes

plot_ratings_in_time(time: list[str | datetime] | None = None, ci: int | None = 0, ax: Axes | None = None, **kwargs)#

Plot predicted discharge versus stage.

Parameters:
  • time (list[str, datetime], optional) – List of times at which to plot the rating curve.

  • ci (float, optional) – Confidence interval. Default is 0 (i.e., no confidence intervals).

  • ax (Axes, optional) – Pre-defined matplotlib axes.

Returns:

ax – Generated matplotlib axes.

Return type:

Axes

plot_stage(covariates: Dataset = None, ax: Axes | None = None, **kwargs)#

Plot observations versus time.

Parameters:

ax (Axes, optional) – Pre-defined matplotlib axes.

Returns:

ax – Generated matplotlib axes.

Return type:

Axes