Re: [R] ggplot2: annotating plot with mathematical formulae

2009-05-17 Thread Paul Murrell
Hi Would a basic call to grid.text() do what you want here? Paul Paul Emberson wrote: Hi Baptiste, I think on this occasion I'll edit manually in inkscape with the textext plugin which is a somewhat clumsy but simple option. Thanks for the link to the wiki which I wasn't aware of until now.

Re: [R] ggplot2: annotating plot with mathematical formulae

2009-05-16 Thread Paul Emberson
Hi Baptiste, I think on this occasion I'll edit manually in inkscape with the textext plugin which is a somewhat clumsy but simple option. Thanks for the link to the wiki which I wasn't aware of until now. Paul baptiste auguie wrote: > If you're desperate for a workaround, you might want to try

Re: [R] ggplot2: annotating plot with mathematical formulae

2009-05-16 Thread baptiste auguie
If you're desperate for a workaround, you might want to try this example using pgfSweave, http://ggplot2.wik.is/Mathematical_annotations On a similar vein, you could try psfrag replacements with a postscript device (there is some code for this on the list archives). Feel free to comment /

Re: [R] ggplot2: annotating plot with mathematical formulae

2009-05-16 Thread hadley wickham
Hi Paul, Unfortunately that's not something that's currently possible with ggplot2, but I am thinking about how to make it possible. Hadley On Sat, May 16, 2009 at 7:48 AM, Paul Emberson wrote: > Hi Stephen, > > The problem is that the label on the graph doesn't get rendered with a > superscrip

Re: [R] ggplot2: annotating plot with mathematical formulae

2009-05-16 Thread Paul Emberson
Hi Stephen, The problem is that the label on the graph doesn't get rendered with a superscript. I want the label on the graph to be rendered the same way as the label you have put on the axis. I am plotting a piecewise function and I wanted to label each section of it. Paul stephen sefick wrot

Re: [R] ggplot2: annotating plot with mathematical formulae

2009-05-15 Thread stephen sefick
how about this a <- 1:10 b <- 1:10 d <- paste("x","^","{n-1}") qplot(a,b, xlab=expression(x^{n-1}))+geom_text(aes(4,8, label=d)) On Fri, May 15, 2009 at 10:02 PM, Paul Emberson wrote: > Hi, > > Is there a way of annotating a ggplot plot with mathematical formulae? > > I can do > > geom_text(aes(

[R] ggplot2: annotating plot with mathematical formulae

2009-05-15 Thread Paul Emberson
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 equ