Is there an elegant way in ggplot2 to make geom_text/geom_label inherit theme specifications like a base_family?
Or asked the other way round: Can I specify a theme that also applies to geom_text/geom_label?
Example:
I want text/labels to look exactly like the axis.text as specified in the theme...
Obviously I could add the specifications manually as optional arguments to geom_text, but I want it to inherit the specifications "automatically"...
library("ggplot2")
ggplot(mtcars, aes(x = mpg,
y = hp,
label = row.names(mtcars))) +
geom_point() +
geom_text() +
theme_minimal(base_family = "Courier")
Addition: A solution that works with ggrepel::geom_text_repel/geom_label_repel as well would be perfect...


