title: How to close with the border of a matplotlib plot
body: <p>I found an odd behavior for pyplot plots. When the number of data points exceeds a certain amount, the line does not draw to the end -- there's white space on the far right that I cannot get rid of. I'd like to know how I can force pyplot to plot the all the way.</p>
  
  <p>I am using Python 2.7.5 and matplotlib 1.2.1.</p>
  
  <pre><code>from pylab import *
  from random import random
  bins = arange(0, 180, 5)
  data = array([random() for i in xrange(len(bins))])
  plot(bins[:10], data[:10], drawstyle="steps-mid") #draws till the end
  title("some data")
  figure()
  plot(bins, data, drawstyle="steps-mid") #white space at the right
  title("all data")
  show()
  </code></pre>
  
  <p>This also happens with other active <code>drawstyle</code> options. I could use a <code>xlim</code> to shrink the xaxis after plotting so that the part cut off is cut off the axis as well, but I'd rather not to as I'd like to keep my axis the way it is. I thought about adding an additional element to <code>bins</code> and a zero to <code>data</code> and using <code>xlim</code>afterwards, but this strikes me as a really quirky fix.</p>
  
  <p>The plots can be seen for <a href="http://i.imgur.com/cvS0bWd.png" rel="nofollow">all data</a> and <a href="http://i.imgur.com/xyfxbDX.png" rel="nofollow">some data</a>.</p>