sc_toolbox.plot.relative_frequencies_boxplots#

sc_toolbox.plot.relative_frequencies_boxplots(relative_frequencies, cluster, cols, order, xlabel='days', hue='batch', figsize=(15, 6), width=0.5, jitter=None, save=None)[source]#

Plots the relative frequencies as split boxplots.

Use calc_relative_frequencies to get the required input format.

Parameters:
  • relative_frequencies (DataFrame) – Calculated by calc_relative_frequencies as Pandas DataFrame

  • cluster – Cluster to be plotted

  • cols – List of colors to use for boxes

  • order – Order of x-axis labels from left to right

  • xlabel (str) – x-axis label

  • hue (str) – Value to color by

  • figsize (Tuple[int, int]) – Size of the figure as specified in matplotlib

  • width (float) – Width of the plot as specified in matplotlib

  • jitter – Set to True for individual dots per sample

  • save – Path to save the plot to

Return type:

None

Example

../../_images/relative_frequencies_boxplots.png