Note the difference between geom_lineand geom_pathapplied to the same data.
library(ggplot2)
x = c(seq(1, 10, 1), seq(10, 1, -1))
y = seq(0, 19, 1)
df = data.frame(x, y)
ggplot(df, aes(x, y)) + geom_line()
ggplot(df, aes(x, y)) + geom_path()

df.
x y
1 1 0
2 2 1
3 3 2
4 4 3
5 5 4
6 6 5
7 7 6
8 8 7
9 9 8
10 10 9
11 10 10
12 9 11
13 8 12
14 7 13
15 6 14
16 5 15
17 4 16
18 3 17
19 2 18
20 1 19
geom_path .
geom_line x.
, x .
x = c(seq(1, 10, .01), seq(10, 1, -.01))
y = seq(.99, 19, .01)
df = data.frame(x, y)
ggplot(df, aes(x, y)) + geom_line()
ggplot(df, aes(x, y)) + geom_path()
