njtierney / naniar

Tidy data structures, summaries, and visualisations for missing data
http://naniar.njtierney.com/
Other
650 stars 54 forks source link

Changing UpSet plot's font size #289

Closed lucazav closed 3 years ago

lucazav commented 3 years ago

I'm trying to change the size of the font used in the UpSet plot in the following way:

gg_miss_upset(tbl) + 
  theme(
    text = element_text(size=14)
  )

but I'm getting an empty plot.

Any hint about how to do that?

njtierney commented 3 years ago

Hi there!

Unfortunately the upset plot is not a regular ggplot object - it is built using https://github.com/hms-dbmi/UpSetR

In the future I might write my own version that is a regular ggplot object, but that is quite complex!

Some of the vignettes here might be able to help you out?

https://cran.rstudio.com/web/packages/UpSetR/

lucazav commented 3 years ago

I managed to do that with the following script:

gg_miss_upset(tbl, text.scale = 2)

Thanks!