title: Crazy lines using ggplot2 line plot
body: <p>The dataframe 'datasim' I'm trying to plot is as below</p>
  
  <pre><code>     Depth     Date       Temp
  7702   0.0 19980601 -0.6577905
  7703   0.1 19980601 -0.1840248
  7704   0.2 19980601  0.5996339
  7705   0.3 19980601  3.3119625
  7706   0.4 19980601  3.9217309
  7707   0.5 19980601  4.0388018
  7708   0.6 19980601  4.0257338
  7709   0.7 19980601  3.9543796
  7710   0.8 19980601  3.8595199
  7711   0.9 19980601  3.7635552
  7712   1.0 19980601  3.6735954
  7713   1.1 19980601  3.5917693
  7714   1.2 19980601  3.5193204
  7715   1.3 19980601  3.4559904  
  7716   1.4 19980601  3.4009090
  7717   1.5 19980601  3.3530415
  7718   1.6 19980601  3.3113879
  7719   1.7 19980601  3.2750543
  7720   1.8 19980601  3.2432676
  7721   1.9 19980601  3.2153632
  7722   2.0 19980601  3.1907631
  7723   2.1 19980601  3.1689482
  7724   2.2 19980601  3.1494289
  7725   2.3 19980601  3.1317168
  7726   2.4 19980601  3.1153033
  7727   2.5 19980601  3.0996626
  7728   2.6 19980601  3.0843152
  7729   2.7 19980601  3.0690151
  7730   2.8 19980601  3.0541184
  7731   2.9 19980601  3.0410244
  7732   3.0 19980601  3.0322053
  7733   3.1 19980601  3.0302451
  7734   3.2 19980601  3.0363760
  7735   3.3 19980601  3.0500890
  7736   3.4 19980601  3.0698218
  7737   3.5 19980601  3.0937937
  7738   3.6 19980601  3.1204821
  7739   3.7 19980601  3.1487569
  7740   3.8 19980601  3.1778400
  7741   3.9 19980601  3.2072096
  7742   4.0 19980601  3.2365085
  7743   4.1 19980601  3.2654762
  7744   4.2 19980601  3.2939086
  7745   4.3 19980601  3.3216428
  7746   4.4 19980601  3.3485619
  7747   4.5 19980601  3.3746048
  7748   4.6 19980601  3.3998141
  7749   0.0 19980601        NaN
  7750   0.0 19980601        NaN
  7751   0.0 19980601        NaN
  7752   0.0 19980601        NaN
  </code></pre>
  
  <p>And I'm using the code</p>
  
  <pre><code>ggplot() + 
  geom_line(data=na.omit(subset(datasim, Date == obsDate[t])),
            aes(y=Depth, x=Temp, size=1.5)) + 
  geom_point(data=subset(dataobs, Date == obsDate[t]),
            aes(y=Depth, x=Temp, size=2)) +
  </code></pre>
  
  <p>However, it gives plot like this, but it should just be a clean line. Could anyone tell me how to get rid of these extra weird lines? I've tried sorting the arrays but it didn't help.
  <a href="https://i.stack.imgur.com/tU7Gj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tU7Gj.png" alt="enter image description here"></a></p>