Re: [R] ggplot, getting two scales and one stat.

2008-09-30 Thread hadley wickham
Hi Tylere, This is a bug present in R 2.7.2 which will be fixed in the next version (which I'm trying to release ASAP) Hadley On Sat, Sep 27, 2008 at 4:21 PM, Tylere Couture <[EMAIL PROTECTED]> wrote: > Thanks Hadley, unfortunately doing this gives me an error: > >> ggplot(polls, aes(x =Date, y

Re: [R] ggplot, getting two scales and one stat.

2008-09-27 Thread Tylere Couture
Thanks Hadley, unfortunately doing this gives me an error: > ggplot(polls, aes(x =Date, y = Popular_Support, colour=Party)) + + stat_smooth(span=0.5) + + geom_point(aes(shape=Source)) Error in `[.data.frame`(df, , var) : undefined columns selected if I move it back up into ggplot, then it works f

Re: [R] ggplot, getting two scales and one stat.

2008-09-27 Thread hadley wickham
On Sat, Sep 27, 2008 at 1:08 AM, Tylere Couture <[EMAIL PROTECTED]> wrote: > I have a simple plot: > > ggplot(polls, aes(x =Date, y = Popular_Support, colour=Party, shape=Source)) > + > stat_smooth(span=0.5) + > geom_point() > > How can I get the smooth to only render along one of the scales? ie, I

[R] ggplot, getting two scales and one stat.

2008-09-26 Thread Tylere Couture
I have a simple plot: ggplot(polls, aes(x =Date, y = Popular_Support, colour=Party, shape=Source)) + stat_smooth(span=0.5) + geom_point() How can I get the smooth to only render along one of the scales? ie, I want to see regressions for each colour, but not each shape. Right now I get a trendlin