Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save juanchiem/e7e13cc64fbe91b57cbc8fc7f8f36e83 to your computer and use it in GitHub Desktop.
Save juanchiem/e7e13cc64fbe91b57cbc8fc7f8f36e83 to your computer and use it in GitHub Desktop.
ggplot axis labels with superscript and subscript
AntroSO42<-read.csv("antroSO42-.csv", header = TRUE)
Bp <- AntroSO42[ ,(2:4), ]
library(tidyverse)
Bp %>%
gather(value, variable, -Class) %>%
ggplot(aes(Class,
variable)) +
geom_boxplot() +
facet_wrap( ~ value) +
ylab(expression(Anthropogenic~SO[4]^{"2-"}~(ngm^-3))) +
theme_bw(base_size = 16)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment