Quantcast
Channel: Subscript letters in ggplot axis label - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by nzcoops for Subscript letters in ggplot axis label

$
0
0

Okay. I swear I didn't post this just to answer it myself, despite how quickly I got it (always the way when you ask a question!)

Here it is:

ggplot(dat, aes(x=x,y=y)) +    geom_point() +    labs(y=expression(Blah[1][d]))

Thought it best to post the answer rather than remove the question as it may help someone else one day.

'Blahs' aside, what I actually wanted was expression(paste("Hb", A[1][c]," (%)",sep=""))

Why paste0() doesn't work here is beyond me.


Viewing all articles
Browse latest Browse all 3