[R] Mixed Latin, Greek and subscript characters in axis label

Jonathan Williams Jonathan.Williams at dpag.ox.ac.uk
Fri Jun 5 19:28:40 CEST 2009


Dear R-helpers,

I have been trying to figure out how to plot a graph with an axis label
consisting of a mixture of Latin, Greek and subscript characters.
Specifically, I need to write A[beta]{1-42}, where A is Latin script A,
[beta] is Greek lower case beta and {1-42} is subscript '1-42'.
I can use xlab=expression(beta[1-42]) and obtain the [beta]{1-42} part of
the label. But, I can't add the preceding Latin character A to this
expression.
I have tried xlab=expression(A,beta[1-42]), which simply prints 'A'. I have
tried xlab=paste('A',expression(beta[1-42])), but this prints "A
(beta[1-42])".
Anything else that I try returns an error (e.g. xlab=expression(A
beta[1]42]) returns 'Error: unexpected symbol').
So, I would be very grateful if someone can tell me how to write my label.

Thanks,

Jonathan Williams




More information about the R-help mailing list