library(tidyverse)
# See https://stackoverflow.com/a/17313561/120898
pts <- function(x) {
as.numeric(grid::convertUnit(grid::unit(x, "pt"), "mm"))
}
df <- tibble(x = 1:10, y = 1:10)
ggplot(df, aes(x = x, y = y)) +
geom_point() +
annotate(geom = "text", x = 2, y = 5, label = "I'm 10 points",
size = pts(10)) +
annotate(geom = "text", x = 2, y = 8, label = "I'm 5 points",
size = pts(5))
Created on 2019-06-14 by the reprex package (v0.3.0)