gmteunisse / fantaxtic

Fantaxtic - Nested Bar Plots for Phyloseq Data
26 stars 3 forks source link

Change legend text size #27

Closed RHaagmans closed 8 months ago

RHaagmans commented 8 months ago

Hi!

I am trying to change the size of the legend text in a nested plot, but when I add theme(legend.text= element_text(size=8)), I get the error:

Error in `ggplot_add()`:
! Problem merging the `legend.text` theme element
Caused by error in `merge_element()`:
! Only elements of the same class can be merged

I'm wondering if there is a way to change the font size and other parameters of the legend?

Cheers!

RHaagmans commented 8 months ago

Found the answer in this issue: https://github.com/gmteunisse/fantaxtic/issues/15: use theme_nested from ggnested to wrap your theme function.