trevismd / statannotations

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

How to adjust the font size #96

Open ryrl9703 opened 1 year ago

claysmyth commented 1 year ago

This would be nice. Any update on this?

claysmyth commented 1 year ago

Should be pretty easy to edit line 540 of statannotations/Annotator.py to include a fontsize parameter from CONFIGURABLE_PARAMETERS.

A hacky work-around is to just explicitly define annotator._pvalue_format.fontsize after calling annotator.configure() in your script.

trevismd commented 1 year ago

I'm afreaid I can't test right now, but you should be able to pass fontsize to configure to adjust the font size. The default value is 'medium', options are currently float values or one of {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'} (see Matplotlib's text reference)