Re: [R] ggplot: adding layer using different data, groups and also controlling appearance

2009-01-02 Thread ONKELINX, Thierry
ensdag 31 december 2008 18:08 Aan: hadley wickham CC: r-help@r-project.org Onderwerp: Re: [R] ggplot: adding layer using different data,groups and also controlling appearance foo <- data.frame ( x = 1:4, y = 4:1 , membership = c( "A", "A", "B", "B" ) ) bar <

Re: [R] ggplot: adding layer using different data, groups and also controlling appearance

2008-12-31 Thread Juliet Hannah
foo <- data.frame ( x = 1:4, y = 4:1 , membership = c( "A", "A", "B", "B" ) ) bar <- data.frame ( x = 1:4 + 1 , y = 4:1 + 1, membership = rep ( "C", 4 ) ) foo.gg <- ggplot ( mapping = aes ( x = x, y = y , colour = membership ) ) foo.gg <- foo.gg + geom_point(data = foo) booboo.gg <- foo.gg + geo

Re: [R] ggplot: adding layer using different data, groups and also controlling appearance

2008-12-31 Thread hadley wickham
Hi Juliet, Can you please provide a reproducible example of the problem? Thanks, Hadley On Wed, Dec 31, 2008 at 10:14 AM, Juliet Hannah wrote: > This example works now, but does the legend need to be updated > manually? After we specify the color change, it does not appear in the > legend. Tha

Re: [R] ggplot: adding layer using different data, groups and also controlling appearance

2008-12-31 Thread Juliet Hannah
This example works now, but does the legend need to be updated manually? After we specify the color change, it does not appear in the legend. Thanks! On Wed, Sep 24, 2008 at 8:03 PM, hadley wickham wrote: > On Wed, Sep 24, 2008 at 7:57 PM, wrote: >> >> >> I have a more complicated function I am

Re: [R] ggplot: adding layer using different data, groups and also controlling appearance

2008-09-24 Thread hadley wickham
On Wed, Sep 24, 2008 at 7:57 PM, <[EMAIL PROTECTED]> wrote: > > > I have a more complicated function I am trying to write, but I run in to a > problem when I want to > add something to the plot from more than one data set while simultaneously > controlling the > appearance of the additional laye

[R] ggplot: adding layer using different data, groups and also controlling appearance

2008-09-24 Thread rmailbox
I have a more complicated function I am trying to write, but I run in to a problem when I want to add something to the plot from more than one data set while simultaneously controlling the appearance of the additional layer. # Toy data: foo <- data.frame ( x = 1:4, y = 4:1 , membership = c(