strange lines with ggplot2
===

I have the following dataset:

    > str(dat)
    'data.frame':   5000 obs. of  3 variables:
     $ y: num  0.864 0.869 0.871 0.879 0.874 0.871 0.871 0.873 0.864 0.869 ...
     $ A: Factor w/ 5 levels "0.2","0.5","0.8",..: 1 1 1 1 1 1 1 1 1 1 ...
     $ x: num  1 2 3 4 5 6 7 8 9 10 ...
    > head(dat)
          y   A x
    1 0.864 0.2 1
    2 0.869 0.2 2
    3 0.871 0.2 3
    4 0.879 0.2 4
    5 0.874 0.2 5
    6 0.871 0.2 6

The "x" column is the vector `c(1:5000)`:

    > all(dat$x==1:5000)
    [1] TRUE


Hence I don't understand the presence of some lines when drawing the following plot:

    ggplot() + geom_line(aes(x=x, y=y, color=A), data=dat) 


The lines I'm talking about are indicated by the three black arrows in the figure:
![ggplot][1]


  [1]: http://i.stack.imgur.com/ggWEN.jpg