dilimap.pl.boxplot_with_swarm
- dilimap.pl.boxplot_with_swarm(data, x, y, hue_order=None, palette=None, box_alpha=0.2, swarm_size=3, box_width=0.3, axhline=None, xlabel='', ylabel='', title='', show=True, swarm_kwargs=None, show_box=True, show_swarm=True, show_legend=True)
Creates a box plot overlaid with a swarm plot for a given dataset.
- Parameters:
data (DataFrame) – DataFrame containing the data to plot.
x (str) – Column name to use for the x-axis (categorical).
y (str) – Column name to use for the y-axis (numeric).
hue (str) – Column name for grouping categories (optional).
hue_order (list of str) – Order of categories in the hue (optional).
palette (list of colors) – List of colors to use for different categories (optional).
box_alpha (float) – Transparency level for the box plot.
swarm_size (float) – Size of the dots in the swarm plot.
box_width (float) – Width of the box plot.
axhline (float) – Optional y-value to draw a horizontal line (e.g., cutoff).
xlabel (str) – Label for the x-axis (default is empty).
ylabel (str) – Label for the y-axis (default is ‘Value’).
- Returns:
Displays the plot.