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

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Thu, 21 Jun 2007 20:02:45 -0400

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



R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 22 Jun 2007 - 00:08:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 22 Jun 2007 - 03:32:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.