[R] ggplot2: annotating plot with mathematical formulae

Paul Emberson email at calidasoft.co.uk
Sat May 16 04:02:29 CEST 2009


Hi,

Is there a way of annotating a ggplot plot with mathematical formulae?

I can do

geom_text(aes(label="some text", ...

but I can't do

geom_text(aes(label=expression(x^{n-1}), ...

It gives the error

Error: geom_text requires the following missing aesthetics: label

Is there a convenient equivalent?

Cheers,

Paul




More information about the R-help mailing list