Open ryrl9703 opened 1 year ago
Hi!
You should use the plot_and_annotate_facets
function, see some documentation here: https://statannotations.readthedocs.io/en/latest/statannotations.html#statannotations.Annotator.Annotator.plot_and_annotate_facets, to read if/when you are familiar with the basic flows of the package explained in the example notebook or the blog post.
I also would like to do this but I cannot find any tutorial on this. Seems like this figure (example_2facets.png) only appears in the README but nowhere in the tutorials
Here should be the code to this image (with the dataset used in the tutorial, overdue part 2 will cover FacetGrids).
annot = Annotator(None, pairs)
g = sns.FacetGrid(sf, col='State', height=12, sharey=False)
g.map_dataframe(annot.plot_and_annotate_facets, plot='boxplot',
plot_params=plotting_parameters,
configuration={"test": "Mann-Whitney"}, annotation_func="apply_test",
ax_op_before=[["set_yscale", ["log"], {}]])
g.set_axis_labels("Technology Subcategory", "Goal")
g.fig.patch.set_alpha(1)
plt.show()
I just want to draw a figure by FacetGrid in seaborn and add test in it just like the example in the homepage, how should I do?