[R] ggplot2 legend for vertical lines

2008-07-03 Thread baptiste AuguiƩ
Dear all, The following example code produces a graph with ggplot2, to which I add several vertical lines of arbitrary colors. I am not satisfied with the legend: it automatically adds some vertical lines which I'd rather not see (they confuse the reader rather than add information in

Re: [R] ggplot2 legend for vertical lines

2008-07-03 Thread hadley wickham
Hi Baptiste, I've fixed this problem in the development version and you can work around it in the cran version as follows: ggplot(dfr, aes(fact2, values)) + geom_point(aes(colour = fact)) + geom_vline(intercept = 5) (i.e. make sure the vline never sees that colour has been mapped to an