title: Matplotlib xticks not lining up with histogram
body: <p>I'm generating some histograms with matplotlib and I'm having some trouble figuring out how to get the xticks of a histogram to align with the bars.</p>
  
  <p>Here's a sample of the code I use to generate the histogram:</p>
  
  <pre><code>from matplotlib import pyplot as py
  
  py.hist(histogram_data, 49, alpha=0.75)
  py.title(column_name)
  py.xticks(range(49))
  py.show()
  </code></pre>
  
  <p>I know that all of values in the <code>histogram_data</code> array are in <code>[0,1,...,48]</code>. Which, assuming I did the math right, means there are 49 unique values. I'd like to show a histogram of each of those values. Here's a picture of what's generated.</p>
  
  <p><img src="https://i.stack.imgur.com/93Sp0.png" alt="testing"></p>
  
  <p>How can I set up the graph such that all of the xticks are aligned to the left, middle or right of each of the bars?</p>