const-ae / ggsignif

Easily add significance brackets to your ggplots
https://const-ae.github.io/ggsignif/
GNU General Public License v3.0
593 stars 43 forks source link

change text size of asterisk #14

Closed acrylamidetic closed 7 years ago

acrylamidetic commented 7 years ago

Really awesome ggplot package. I'd like to increase the size of the asterisks we get when map_signif_level = true.

If just set 'size = 14' it changes the bracket, not the asterisk size. Changing size of text in theme() doesn't effect the asterisk either.

Anyway to change the text annotations ggsignif adds to the plots? Ideally I'd like to change size and face.

Thanks!

const-ae commented 7 years ago

Hi, happy to hear that you like the package.

Yes there is, the option is called textsize:

library(ggplot2)
library(ggsignif)
ggplot(mpg, aes(class, hwy)) +
  geom_boxplot() +
  geom_signif(comparisons = list(c("compact", "midsize"), c("minivan", "suv")),
              map_signif_level = TRUE, textsize=10, family="serif") +
  ylim(NA, 50)

image