[R] Mixed Latin, Greek and subscript characters in axis label
    baptiste auguie 
    ba208 at exeter.ac.uk
       
    Fri Jun  5 20:30:58 CEST 2009
    
    
  
Jonathan Williams wrote:
> 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
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>   
try xlab=expression(A*beta[1-42])
?plotmath entry *
x*y     juxtapose x and y
HTH,
baptiste
    
    
More information about the R-help
mailing list