Re: [R] ggplot2 legend problem

2009-08-19 Thread Chris Friedl
ven body of > data. > ~ John Tukey > > -Oorspronkelijk bericht- > Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > Namens hadley wickham > Verzonden: woensdag 19 augustus 2009 14:18 > Aan: Chris Friedl > CC: r-help@r-project.org > Onderwerp

Re: [R] ggplot2 legend problem

2009-08-19 Thread ONKELINX, Thierry
erzonden: woensdag 19 augustus 2009 14:18 Aan: Chris Friedl CC: r-help@r-project.org Onderwerp: Re: [R] ggplot2 legend problem On Tue, Aug 18, 2009 at 11:10 PM, Chris Friedl wrote: > > Still struggling with this. A further example using a slightly > different organisation of the data. The

Re: [R] ggplot2 legend problem

2009-08-19 Thread hadley wickham
On Tue, Aug 18, 2009 at 11:10 PM, Chris Friedl wrote: > > Still struggling with this. A further example using a slightly different > organisation of the data. The factors "A" and "B" are included in the > dataframe in an attempt to get ggplot to generate a legend automatically. > > x <- data.frame(

Re: [R] ggplot2 legend problem - SOLVED

2009-08-18 Thread Chris Friedl
Trawling the online and pdf manuals for density plots further I found a reference to position and tried it with histograms. It worked! So here is an example that gives me overlapping histograms, alpha transparency so they can both be seen in the area of overlap, and with properly labelled and col

Re: [R] ggplot2 legend problem

2009-08-18 Thread Chris Friedl
Still struggling with this. A further example using a slightly different organisation of the data. The factors "A" and "B" are included in the dataframe in an attempt to get ggplot to generate a legend automatically. x <- data.frame(value=rnorm(5000, mean=0), case="A") y <- data.frame(value=rnorm