I've been looking what seems to be everywhere. I would like to know what the default unit size of annotate() is in ggplot2, as I'm not able to set size to a specific unit in annotate().
For example, I tried the following, but it didn't work:
annotate(geom = "text", label = "Am I a bird?",
x = "ABC", y = 2375/2,
family = "Arial", size = unit(10, "mm"), colour = "white")
Error in checkNA("fontsize") :
mixture of missing and non-missing values for fontsize
Thanks for your help!
size = 10therefore results in a font size of 10mm. If you want want to draw a 10pt text instead, set size = 10 / ggplot2::.pt. See ggplot2.tidyverse.org/articles/ggplot2-specs.html#text.