I plot a 2 geom_point graph with the following code:
source(\"http://www.openintro.org/stat/data/arbuthnot.R\")
library(ggplot2)
ggplot() +
geom_point(aes(
This is the trick that I usually use. Add colour argument to the aes and use it as an indicator for the label names.
ggplot() +
geom_point(aes(x = year,y = boys, colour = 'Boys'),data=arbuthnot) +
geom_point(aes(x = year,y = girls, colour = 'Girls'),data=arbuthnot,shape = 17) +
xlab(label = 'Year') +
ylab(label = 'Rate')