trevismd / statannotations

add statistical significance annotations on seaborn plots. Further development of statannot, with bugfixes, new features, and a different API.
Other
618 stars 67 forks source link

Customize Annotations #147

Open SimonE1220 opened 2 months ago

SimonE1220 commented 2 months ago

Dear all, I wanted to ask if I can customize the statistical annotations of the plot. For example: I have a p value of 0.032 and 0.00023 Can this values be displayed as P=0.032 and if the p values is smaler than 0.001 it is displayed as P=2.3*10^-4 Additionally, I want to use just a line instead of the bracket for the annotation.

Thank you in advanced. Simon

tlint101 commented 2 months ago

Hi there. Not sure if you have solved your problem yet.

I'm not sure how if it is possible to draw a line instead of a bracket for the annotation. As for the custom annotations, this is possible. This is done using:

annot.set_custom_annotations(["Your Custom Annotation"])

You can see further examples with the example notebook here. It should be down by cell 21.