# scope_profiler.plotting_scripts.flame

*module*

Flame chart rendering: nested call-stack frames sized by duration.

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

## scope_profiler.plotting_scripts.flame.FLAME_CMAP

*attribute* · *module attribute*

```python
FLAME_CMAP = 'inferno'
```

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

## scope_profiler.plotting_scripts.flame.plot_flame

*attribute* · *module attribute*

```python
plot_flame = plot_flame_chart
```

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

## scope_profiler.plotting_scripts.flame.plot_flame_chart

*function*

```python
def plot_flame_chart(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 = FLAME_CMAP, data_filepath: str | Path | None = None, data_format: str = 'csv', backend: str = 'matplotlib', return_fig: bool = False) -> object | None
```

Plot a flame chart reconstructing the call stack from region timings.

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/flame.py#L32-L330)

## scope_profiler.plotting_scripts.flame.plot_flame_graph

*function*

```python
def plot_flame_graph(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 = FLAME_CMAP, data_filepath: str | Path | None = None, data_format: str = 'csv', backend: str = 'matplotlib', return_fig: bool = False) -> object | None
```

Plot an aggregated flame graph whose x-axis represents total time.

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