[R] Adding exponents (superscript format) to a plot

Duncan Murdoch murdoch at stats.uwo.ca
Fri Jun 22 02:02:45 CEST 2007


On 21/06/2007 7:39 PM, Judith Flores wrote:
 > Hi,
 >
 >    I need to add exponents to a label in one of the
 > axes of a plot, how can I do this?

See ?plotmath.  For example,

plot(1,2, xlab=expression(x^2), ylab=expression(exp(-x^2/2)))

Duncan Murdoch



More information about the R-help mailing list