# scope_profiler.plotting_scripts.duration_timeseries

*module*

Duration-vs-time scatter: per-region call durations across the run.

[View source](https://github.com/max-models/scope-profiler/blob/devel/src/scope_profiler/plotting_scripts/duration_timeseries.py#L1-L1)

## scope_profiler.plotting_scripts.duration_timeseries.plot_duration_timeseries

*function*

```python
def plot_duration_timeseries(profiling_data: ProfilingResults | Sequence[ProfilingResults], ranks: list[int] | int | None = None, include: list[str] | str | None = None, exclude: list[str] | str | None = None, filepath: str | None = None, show: bool = False, verbose: bool = True, cmap: str = DEFAULT_CMAP, log_scale: bool = False, data_filepath: str | Path | None = None, data_format: str = 'csv', backend: str = 'matplotlib', return_fig: bool = False) -> None
```

Plot each region's call duration over wall-clock time, with a min-max band.

One line per region tracks the mean duration over the ranks that recorded
each call, shaded between the minimum and maximum duration seen across
those ranks, so rank imbalance shows up as a widening band.

Parameters
----------
backend : str
    Backend to use for rendering: "matplotlib" (default) or "plotly".
return_fig : bool
    Return the rendered figure instead of the default ``None``. Matplotlib
    returns ``(fig, axes)``; Plotly returns its figure object.

[View source](https://github.com/max-models/scope-profiler/blob/devel/src/scope_profiler/plotting_scripts/duration_timeseries.py#L81-L275)
