--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
Hi Dennis,
Oh no, I want all four colours being present in the legend.
> If you don't want the line colors in the legend
There is no need for a second legend since the shape comes from
geom_point(), which is already represented in the legend (through the
colors). Hence merging both legends into one is the obvious goal.
And as you have said, putting colour outside of aes() does indeed
clean up the legend, but now i don't see the hline-color in the
legend...
Best,
Thomas
--
> try some trickery with scale_colour_manual and scale_shape_manual, but that
> may be the only way. To merge two scales, you need the same title and the
> same set of breaks, if I recall correctly. As it stands now, you have four
> breaks for colour and two for shape.
I just tried scale_*_manual and it can indeed merge the two legends.
The only problem is that when you set
scale_shape_manual(values=c(1,2,3,4)), the two hline-legend-entries
actually have the same shape, although the lines don't.
looks like this: http://yfrog.com/julegendszj
Not sure how to change that though.
Thomas