I\'m trying to plot three datasets onto the same graph. One dataset should appear on the graph as just a set of unconnected points, whereas the other two should appear as co
You can feed a different dataset into each geom. So you can pass in a dataset excluding p1 into the geom_line layer. Something like this should work:
ggplot(zz, aes(x, value, color = L1)) +
geom_point() +
geom_line(data = subset(zz, L1 %in% c("p2", "p3")), aes(group = L1)) +
scale_color_manual("Dataset", values = c("p1" = "darkgreen", "p2" = "blue", "p3" = "red"))