voyagerpy.plotting.grouped_violinplot#

voyagerpy.plotting.grouped_violinplot(ax: Axes, df: DataFrame, x: str, y: str, cmap: str | None = None, legend: bool = True, vert: bool = True, x_label: str | None = None, y_label: str | None = None, scatter_points: bool = True, jitter: bool = False, **kwargs) Axes#

Draw a grouped violinplot.

Parameters:
  • ax (Axes) – The axis to draw the violinplot on.

  • df (DataFrame) – The dataframe containing the data to plot.

  • x (str) – The column name of the values to plot.

  • y (str) – The column name to group by.

  • cmap (Optional[str], optional) – The colormap to use, by default None.

  • legend (bool, optional) – Whether to draw a legend, by default True.

  • vert (bool, optional) – Whether to draw the violins vertically, by default True.

  • x_label (Optional[str], optional) – The label to display on the x-axis, by default None.

  • y_label (Optional[str], optional) – The label to dispaly on the y-axis, by default None.

  • scatter_points (bool, optional) – Whether to draw scatter points within the violins, by default True.

  • jitter (bool, optional) – Whether to distribute the scattered points along the width of the violins, by default False.

  • **kwargs – Keyword arguments to pass to scatter().

Returns:

The axis containing the violinplot.

Return type:

Axes