You need a dataframe in long format:
dfrm <- data.frame(x=rep(x,3), y=c(y1,y2,y3),
group=rep(c("y1","y2","y3") ,each=2) )
ggplot(data=dfrm, aes(x=x,y=y,group=group) ) +
geom_point()+geom_line(aes(col=group))
(The legend appears automagically.) There are also xlim
and ylim
functions if you wanted to enforce the 'xx' and yy limits that you applied to the blank plot framework in your base graphics template.