When we have both shape and color legend in scatter plot, the shape of color legend is misleading:
foo <- data.frame(
length=runif(10),
height=runif(1
It is possible to manually change the properties of the legend using guides
:
ggplot(foo, aes(x = length, y = height, color=group, shape=quality)) +
geom_point(size=5) +
guides(colour = guide_legend(override.aes = list(shape = 15)))
Just play around with the shape
paramater to find an appropriate shape.