statannotations icon indicating copy to clipboard operation
statannotations copied to clipboard

How to adjust the font size

Open ryrl9703 opened this issue 2 years ago • 3 comments

ryrl9703 avatar Dec 12 '22 07:12 ryrl9703

This would be nice. Any update on this?

claysmyth avatar Jan 12 '23 01:01 claysmyth

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.

claysmyth avatar Jan 12 '23 02:01 claysmyth

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)

trevismd avatar Jan 13 '23 09:01 trevismd