On Feb 7, 2008 3:43 AM, Engelmann, Bernd <[EMAIL PROTECTED]> wrote: > Hello, > > the same parameter for colour and shape aesthetics gives 2 legends: > > library(ggplot2) > p <- ggplot(mtcars, aes(x=wt, y=mpg)) > p + geom_point(aes(colour=factor(cyl), shape=factor(cyl))) > > Can the 2 legends be consolidated to one with > colours and shapes of the symbols matched between legend and plot ?
Not in the current version of ggplot2, but I'm working on that code in the development version at the moment and it will be included in the next version. If your real example is more complicated than that, please let me know so that I can check if my code works. Hadley -- http://had.co.nz/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.