Superscript text in ggplot2 R plots. Use the bquote function in ggplot

PHOTO EMBED

Fri Apr 09 2021 15:01:26 GMT+0000 (Coordinated Universal Time)

Saved by @Boreal #r

library(ggplot2)
ggplot(mtcars, aes(hp, mpg)) + 
       geom_point() +
       labs(x = bquote('x axis'~(Å^2)), y = "y axis") +
       #or
       #labs(x = bquote('x axis'~(ring(A)^2)), y = "y axis") 
       theme_bw()
content_copyCOPY