title: matplotlib connecting wrong points in line graph
body: <p>I am plotting two lists using matplotlib python library. There are two arrays <strong>x</strong> and <strong>y</strong> which look like this when plotted-</p>
  <p><a href="http://www.flickr.com/photos/132442624@N02/19866014348/in/dateposted-public/" rel="nofollow noreferrer">Click here for plot (sorry don't have enough reputation to post pictures here)</a></p>
  <p>The code used is this-</p>
  <pre><code>import matplotlib.pyplot as plt
  plt.plot(x,y,&quot;bo&quot;)
  plt.fill(x,y,'#99d8cp')
  </code></pre>
  <p>It plots the points then connects the points using a line. But the problem is that it is not connecting the points correctly. Point 0 and 2 on x axis are connected wrongly instead of 1 and 2. Similarly on the other end it connects points 17 to 19, instead of 18 to 19. I also tried plotting simple line graph using-</p>
  <pre><code>plt.plot(x,y)
  </code></pre>
  <p>But then too it wrongly connected the points. Would really appreciated if anyone could point me in right direction as to why this is happening and what can be done to resolve it.</p>
  <p>Thanks!!</p>