stacked_split_violin

besca.pl.stacked_split_violin(tidy_data, x_axis, y_axis, split_variable, subset_variable_label, subset_variables, fig_width=8, fig_height=4, order=None, inner='box')[source]

plot stacked split violin plots.

General plotting function to produce stacked split violin plots.

Parameters:
  • tidy_data (DataFrame) – pandas DataFrame containing the complete data that is to be plotted in a tidy format.

  • x_axis (str) – string identifying which column of the DataFrame is to be plotted on the x-axis

  • y_axis (str) – string identifying which column of the DataFrame is to be plotted on the y-axis

  • split_variable (str) – string identifying which column of the DataFrame is to be used to generate the split violin plot (can only contain two categories of data!)

  • subset_variable_label (str) – string identifiyng which column of the DataFrame contains the variables that should be used to make datasubsets for each plot of the stacked violin plot

  • subset_variabels (list) – list identifying the subsets that should be generated

  • fig_width (width or None | default = 8) – optional parameter to define figure width of the plot that is to be generated

  • fig_height (height or None | default = 4) – optional parameter to define figure height of the plot that is to be generated

  • order

  • inner ('box' or 'quartile' or 'point' or 'stick') – define how the datapoints should be displayed in the violin interior, see seaborns documentation for more details

Return type:

Figure