[R] isotope superscripts ggplot2
Barry Rowlingson
b.rowlingson at lancaster.ac.uk
Fri Sep 30 20:30:36 CEST 2011
On Fri, Sep 30, 2011 at 4:31 PM, Durant, James T. (ATSDR/DTEM/PRMSB)
<hzd3 at cdc.gov> wrote:
> Happy Friday fellow R users.
>
> I need some help - I am trying to make a graph using ggplot 2 of some lead isotope ratios. Normally, the isotope mass number appears as a superscript before the chemical symbol. However, I cannot figure out how to do this ggplot2's axis labels. The closest I have come is using "." In front of the numbers I am superscripting e.g:
>
>
> ggplot(.... +xlab(expression(.^207*"Pb/"*.^206*"Pb"))+ylab(expression(.^208*"Pb/"*.^206*"Pb")
Stick an empty expression in place of the '.' something like:
expression({}^208*"Pb/"*{}^206*"Pb")
Barry
More information about the R-help
mailing list