I am trying to connect the points from geom_jitter()
.
df<-data.frame(x = c(1, 1, 2, 2, 3, 3),
y = c(1, 1, 2 , 3, 6, 5),
z = c("A", "B", "A", "B", "A", "B"))
ggplot(df, aes(x = x, y = y, col = z)) +
geom_jitter() +
geom_line()
Now the lines and points are not connected.