[R] Writing greek letters and subscripts in graph

Mike Prager mike.prager at noaa.gov
Thu Sep 18 18:45:12 CEST 2008


"Delphine COURVOISIER" <Delphine.Courvoisier at hcuge.ch> wrote:

> I would like to write Greek letters followed by subscripts in a graph (on the X-axis and in a legend). I would appreciate any help.

As others have said, try 

demo(plotmath) and also 

? plotmath

Here's a brief example:

plot(1:10, 1:10)
title("Concentration of" ~alpha[3])
text(2,3, ~ beta[z])

Note the use of "~" to denote an expression, so that the
material following the tilde is interpreted as such.

-- 
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.



More information about the R-help mailing list