I have a series of ordered points as shown below:
However when I try to connec
geom_path()
will join points in the original order, so you can order your data in the way you want it joined, and then just do + geom_path()
. Here's some dummy data:
dat <- data.frame(x = sample(1:10), y = sample(1:10), order = sample(1:10))
ggplot(dat[order(dat$order),], aes(x, y)) + geom_point() + geom_text(aes(y = y + 0.25,label = order)) +
geom_path()