I really like to use R for all my graphs, and as I work with stable isotopes I want to have a proper chemical notation in my plots I have looked at ?plotmath, but didn't find the answer and also searched the R website. ------------------------------------------------------------------------ -- plot(1:10,xlab=expression(^{14}*C)) # I want to have a superscript with nothing in front, but it doesn't work plot(1:10,xlab=expresssion(.^{14}*C)) # this works, but is not beautiful Any ideas ? ------------------------------------------------------------- Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Yerseke Phone: +31 113 577473 h.andersson at nioo.knaw.nl http://www.nioo.knaw.nl/ppages/handersson
Hi!> -----Original Message----- > From: Andersson, Henrik [SMTP:H.Andersson at nioo.knaw.nl] > Sent: Tuesday, May 18, 2004 12:00 PM > To: r-help at stat.math.ethz.ch > Subject: [R] Isotopic notation in plots > > plot(1:10,xlab=expresssion(.^{14}*C)) # this works, but is not >I wonder how this works.... Isn't there one 's' too much in the expresssion? ;-) Anyway: you want to have the notation without the dot? Why not try: plot(1:10,xlab=expression({ }^{14}*C)) Hope this is what you wanted...or what did you mean by saying "not beautiful"? Best, Roland +++++ This mail has been sent through the MPI for Demographic Rese...{{dropped}}
Try:> plot(1:10,xlab=expression(phantom(0)^{14}*C))Christophe -- Christophe Declercq, MD Observatoire regional de la sante Nord-Pas-de-Calais 13, rue Faidherbe F-59046 LILLE Cedex Phone 33 3 20 15 49 24 Fax 33 3 20 55 92 30 E-mail c.declercq at orsnpdc.org> -----Message d'origine----- > De : r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch]De la part de Andersson, Henrik > Envoye : mardi 18 mai 2004 11:00 > A : r-help at stat.math.ethz.ch > Objet : [R] Isotopic notation in plots > > > I really like to use R for all my graphs, and as I work with stable > isotopes I want to have a proper chemical notation in my plots > > I have looked at ?plotmath, but didn't find the answer and also searched > the R website. > ------------------------------------------------------------------------ > -- > > plot(1:10,xlab=expression(^{14}*C)) # I want to have a superscript with > nothing in front, but it doesn't work > > plot(1:10,xlab=expresssion(.^{14}*C)) # this works, but is not > beautiful > > Any ideas ? > > > ------------------------------------------------------------- > Henrik Andersson > Netherlands Institute of Ecology - > Centre for Estuarine and Marine Ecology > P.O. Box 140 > 4400 AC Yerseke > Phone: +31 113 577473 > h.andersson at nioo.knaw.nl > http://www.nioo.knaw.nl/ppages/handersson > > ______________________________________________ > R-help at 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 > >
Henrik, Please try: plot(1:10,xlab=expression({}^{14}*C)) -----Original Message----- From: Andersson, Henrik [mailto:H.Andersson at nioo.knaw.nl] Sent: May 18, 2004 7:00 AM To: r-help at stat.math.ethz.ch Subject: [R] Isotopic notation in plots I really like to use R for all my graphs, and as I work with stable isotopes I want to have a proper chemical notation in my plots I have looked at ?plotmath, but didn't find the answer and also searched the R website. ------------------------------------------------------------------------ -- plot(1:10,xlab=expression(^{14}*C)) # I want to have a superscript with nothing in front, but it doesn't work plot(1:10,xlab=expresssion(.^{14}*C)) # this works, but is not beautiful Any ideas ? ------------------------------------------------------------- Henrik Andersson Netherlands Institute of Ecology - Centre for Estuarine and Marine Ecology P.O. Box 140 4400 AC Yerseke Phone: +31 113 577473 h.andersson at nioo.knaw.nl http://www.nioo.knaw.nl/ppages/handersson ______________________________________________ R-help at 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
On 18-May-04 Andersson, Henrik wrote:> plot(1:10,xlab=expression(^{14}*C)) # I want to have a superscript > with > nothing in front, but it doesn't work > > plot(1:10,xlab=expresssion(.^{14}*C)) # this works, but is not > beautifulTry: plot(1:10,xlab=expresssion(""^{14}*C)) ?? Ted.
From: "Christophe Declercq" <cdeclercq at nordnet.fr>> Try: > > > plot(1:10,xlab=expression(phantom(0)^{14}*C))Just out of interest, how do I find out what phantom(0) does? I tried both ?phantom and help.search("phantom") without getting any hits, and yet the expression posed above creates a leading blank space in the axis label. I take the latter to mean that phantom() is available withinin the basic packages (search path). Where do I read more? Thanks, Rob
Robert W. Baer, Ph.D. wrote:> From: "Christophe Declercq" <cdeclercq at nordnet.fr> > >>Try: >> >> >>>plot(1:10,xlab=expression(phantom(0)^{14}*C)) > > > Just out of interest, how do I find out what phantom(0) does? I tried both > ?phantom and help.search("phantom") without getting any hits, and yet the > expression posed above creates a leading blank space in the axis label. I > take the latter to mean that phantom() is available withinin the basic > packages (search path). > > Where do I read more??plotmath Uwe Ligges> Thanks, > Rob > > ______________________________________________ > R-help at 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
On Tue, 18 May 2004, Robert W. Baer, Ph.D. wrote:> From: "Christophe Declercq" <cdeclercq at nordnet.fr> > > Try: > > > > > plot(1:10,xlab=expression(phantom(0)^{14}*C)) > > Just out of interest, how do I find out what phantom(0) does? I tried both > ?phantom and help.search("phantom") without getting any hits, and yet the > expression posed above creates a leading blank space in the axis label. I > take the latter to mean that phantom() is available withinin the basic > packages (search path).No, as it is part of plotmath syntax, not an R function.> Where do I read more?library(graphics) ?plotmath demo(plotmath) -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595