Ok, I think my first mail didn't get through so I'll try this again. Please disregard. I'm trying to use subscripts on plot text. The help files say this can be done and give several example. I'm trying to do: P_{2} (for example) and so I tried: text(5,2,expression(P_{2})) which doesn't work. There are no subscript examples. I recall someone telling me that latex-like expressions worked, but this does not, so apparently there is some not so obvious way to do this, or there is a bug of some sort. Can someone advise me and/or point me to docs that explicitly address math notation in plot text? thanks and regards, andy -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 7 Jan 1999 royle at penguin.irm.r9.fws.gov wrote:> Ok, I think my first mail didn't get through so I'll try this again. > Please disregard. > > I'm trying to use subscripts on plot text. > > The help files say this can be done and give several example. > > I'm trying to do: P_{2} (for example) and so I tried: > > text(5,2,expression(P_{2}))Try text(5,2,expression(P[2]))> > which doesn't work. There are no subscript examples. I recall > someone telling me that latex-like expressions worked, but this does > not, so apparently there is some not so obvious way to do this, or > there is a bug of some sort. > > Can someone advise me and/or point me to docs that explicitly > address math notation in plot text?doc/manual/plotmath.tex (or Man.dvi if you have compiled this). Thomas Lumley Assistant Professor, Biostatistics University of Washington,Seattle -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 7 Jan 1999 royle at penguin.irm.r9.fws.gov wrote:> I'm trying to use subscripts on plot text. > > The help files say this can be done and give several example. > > I'm trying to do: P_{2} (for example) and so I tried: > > text(5,2,expression(P_{2})) >Try square brackets: text(5,2,expression(P[2]) (Some of the examples under help(text) do give examples of subscripts, although you might not be able to tell unless you tried them and looked at the results.) Interestingly, under 0.62.3 on SunOS 4 I can get R to core dump with a bus error by trying to feed it text(5,2,expression(P_{2})) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._