Re: [R] Isotopic notation in plots

About this list Date view Thread view Subject view Author view Attachment view

From: Barry Rowlingson (B.Rowlingson@lancaster.ac.uk)
Date: Wed 19 May 2004 - 00:46:04 EST


Message-id: <40AA21AC.3000208@lancaster.ac.uk>


> Try:
>
> plot(1:10,xlab=expresssion(""^{14}*C))
>
> ??

Is there a way of showing atomic number and atomic mass next to the symbol?

This:
plot(1:10,xlab=expression({}[7]^{14}*C))

almost works, but the 7 is adjacent to the invisible {}, instead of
being right-aligned next to the C.

Slightly closer is:
plot(1:10,xlab=expression(scriptstyle(atop(7,14))*C))

but the 7 and 14 are centre-aligned.

Padding the 7 out with a phantom 0 looks okay though:

expression({}[phantom(0)*7]^{14}*C))

Apologies to chemists if I've got my atomic number and atomic mass the
wrong way up.

Barry

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST