# plot_utils

Python API: `luxonis_ml.data.utils.plot_utils`

## Functions

| Name | Description |
| --- | --- |
|
[`plot_class_distribution`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/utils/plot_utils.md)
| Plot a class distribution bar chart. |
|
[`plot_heatmap`](https://docs.luxonis.com/software-v3/ai-inference/model-source/training/luxonis-ml/luxonis-ml-api-reference/data/utils/plot_utils.md)
| Plot a heatmap. |

### function `plot_class_distribution`

```python
def plot_class_distribution(
    ax: plt.Axes,
    task_type: str,
    task_data: list[dict[str, Any]],
)
```

Plot a class distribution bar chart.

Args

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `ax` | `plt.Axes` | Axis to plot on. | required |
| `task_type` | `str` | Task type. | required |
| `task_data` | `list[dict[str, Any]]` | Class distribution records. | required |

### function `plot_heatmap`

```python
def plot_heatmap(
    ax: plt.Axes,
    fig: plt.Figure,
    task_type: str,
    heatmap_data: list[list[float]] | None,
)
```

Plot a heatmap.

Args

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `ax` | `plt.Axes` | Axis to plot on. | required |
| `fig` | `plt.Figure` | Figure containing the axis. | required |
| `task_type` | `str` | Task type. | required |
| `heatmap_data` | `list[list[float]] | None` | Heatmap values to plot. | required |
