pastas.plotting.modelplots.Plotting.contribution#

pastas.plotting.modelplots.Plotting.contribution(tmin: pandas.Timestamp | str | None = None, tmax: pandas.Timestamp | str | None = None, name: str | None = None, plot_stress: bool = True, plot_response: bool = False, block_or_step: Literal['block', 'step'] = 'step', istress: int | None = None, ax: pastas.typing.Axes | None = None, **kwargs) dict[str, pastas.typing.Axes]#

Plot the contribution of a stressmodel and optionally the stress and the response.

Parameters:
  • tmin (pandas.Timestamp or str, optional) – A string or pandas.Timestamp with the start date for the period (E.g. ‘1980-01-01 00:00:00’). Strings are converted to pandas.Timestamp internally.

  • tmax (pandas.Timestamp or str, optional) – A string or pandas.Timestamp with the end date for the period (E.g. ‘2020-01-01 00:00:00’). Strings are converted to pandas.Timestamp internally.

  • name (str, optional) – Name of the stressmodel to plot the contribution for.

  • plot_stress (bool, optional) – Plot the stress on an overlay axes.

  • plot_response (bool, optional) – Plot the step response on a separate axes on the right.

  • block_or_step ({"block", "step"}, optional) – Type of response to plot, either ‘block’ or ‘step’. Default is ‘step’.

  • istress (int, optional) – Index of the stress to plot the response for. Default is None.

  • ax (dict or matplotlib.axes.Axes, optional) – Dictionary containing axes with ‘con’ and ‘rf’ as keys, or a single axes instance for the contribution plot.

  • kwargs (dict, optional) – Passed to the stress plot.

Returns:

axes – Dictionary containing the axes for the contribution, and optionally the stress and response.

Return type:

dict