violin_plot#
- class braintools.visualize.violin_plot(data, labels=None, positions=None, showmeans=True, showmedians=True, ax=None, figsize=(10, 6), colors=None, xlabel='Groups', ylabel='Values', title=None, **kwargs)#
Create violin plot for comparing distributions.
- Parameters:
data (
ndarray|List[ndarray]) – Data for each group.showmeans (
bool) – Whether to show means.showmedians (
bool) – Whether to show medians.ax (
Axes|None) – Axes to plot on.figsize (
Tuple[float,float]) – Figure size if creating new figure.xlabel (
str) – Axis labels and title.ylabel (
str) – Axis labels and title.**kwargs – Additional arguments passed to violinplot.
- Returns:
ax – The axes object containing the plot.
- Return type:
Axes