Skip to content

Instantly share code, notes, and snippets.

@trevismd
Last active July 21, 2021 15:50
Show Gist options
  • Save trevismd/9c5946bcee4cfdf27342f21811518840 to your computer and use it in GitHub Desktop.
Save trevismd/9c5946bcee4cfdf27342f21811518840 to your computer and use it in GitHub Desktop.
Applying Bonferroni
with sns.plotting_context("notebook", font_scale = 1.4):
# Create new plot
ax = get_log_ax()
# Plot with seaborn
ax = sns.boxplot(ax=ax, **hue_plot_params)
# Add annotations
annotator = Annotator(ax, pairs, **hue_plot_params)
annotator.configure(test="Mann-Whitney", comparisons_correction="bonferroni")
_, corrected_results = annotator.apply_and_annotate()
# Label and show
add_legend(ax)
label_plot_for_subcats(ax)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment