R plot label with superscript as first character

Viewed 891

I am using R plots to plot isotopic data. I want to have an axis label with a superscript as the first character. I have tried to do it the same way as for superscripts on the second caracter but get the following error

x<-seq(0,10) y<-seq(0,10) plot(x, y, ylab=expression(paste(^87,'Sr/',^'86','Sr')))

Error: unexpected '^' in "plot(x, y, ylab=expression(paste(^"

Thanks for your help.

2 Answers

The trick is to put an empty string at the start:

ylab=expression(text=''^87*'Sr/'^86*'Sr'))

This command worked for me:

ylab(expression(~''^{"87"}~Sr/~''^{"86"}~Sr))
Related