Reputation: 157
I have the following code for the y axis label in ggplot
y = bquote('PM2.5 ('*µg~m^-3*')')
I want the 2.5 to be subscript but can't figure out how whilst also keeping the part in the brackets how I want it.
I want the output in R on the y axis label to look like this:
Upvotes: 0
Views: 237
Reputation: 887118
We may use
plot(1, 1, main = bquote('PM'[2.5]~'('*µg~m^-3*')'))
-output
Upvotes: 1