I am still struggling with correct labels of my plots. I managed to get this to work.
df <-data.frame(a=seq(1,20),b=seq(1,20))
ggplot(df, aes(x = a, y = b)) + geom_point() +
ylab(expression(paste(CH[4]~" formation rate"~"(",mu, mol, day^{-1},")")))
What it is missing is the operator sign " * " between mumol and day^-1. It should look like this:
Thank you for your help.
I prefer not to use the paste style for expressions but to use ~ and * to separate terms with or without a space respectively. If you want an *, put it in quotes.
ggplot(df, aes(x = a, y = b)) +
geom_point() +
ylab(expression(CH[4]~formation~rate~(mu*mol~'*'~day^{-1})))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With