Geom_point() and geom_line() for multiple datasets on same graph in ggplot2?

The trick is that each layer can have its own dataset. So you have to subset the data to exclude L1=="p1 from the data provided to geom_line.

The trick is that each layer can have its own dataset. So you have to subset the data to exclude L1=="p1" from the data provided to geom_line: ggplot(zz, aes(x, y=value, color=L1)) + geom_point() + geom_line(data=zzzz$L1! ="p1", ) + scale_color_manual("Dataset", values = c("p1" = "darkgreen", "p2" = "blue", "p3" = "red")).

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), legend = FALSE) + scale_color_manual("Dataset", values = c("p1" = "darkgreen", "p2" = "blue", "p3" = "red")) The legend = FALSE keeps the lines from showing up through the coloured points.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions