Skip to content

violin

AeroViz.plot.violin.violin

violin(df: DataFrame | dict, unit: str, ax: Axes | None = None, **kwargs) -> tuple[Figure, Axes]

Generate a violin plot for multiple data sets.

Parameters:

Name Type Description Default
df DataFrame or dict

A mapping from category names to pandas DataFrames containing the data.

required
unit str

The unit for the data being plotted.

required
ax Axes

The Axes object to draw the plot onto. If not provided, a new figure will be created.

None
**kwargs dict

Additional keyword arguments to be passed to the violinplot function.

{}

Returns:

Name Type Description
fig Figure

The matplotlib Figure object.

ax Axes

The matplotlib Axes object with the scatter plot.