title: Why is Python Matplotlib bar-chart's X axis ticks showing strange and wrong negative values?
body: <p>Why is my X-axis ticks showing Negative values when the Xaxis values range from 43990 - 44003. </p>
  
  <pre><code>import matplotlib.pyplot as plt
  x=[44000, 44001, 44002, 44003, 43990, 43991, 43992, 43993, 43994, 43995, 43996, 43997, 43998, 43999]
  y=[8, 5, 3, 1, 1, 3, 4, 10, 4, 11, 4, 10, 17, 19]
  plt.bar(x,y)
  plt.show()
  </code></pre>
  
  <p>I am seeing the following output. I was expecting x-axis to range from 43990 - 44003
  <a href="https://i.stack.imgur.com/dQ55X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dQ55X.png" alt="why negative x-axis ticks ?"></a></p>
  
  <p>I have tried this on a couple of machines, all showing similar strange behaviour on recent versions of python and matplotlib (tried a few different versions)</p>
  
  <blockquote>
    <p>Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19)
    [GCC 7.2.0] on linux</p>
    
    <p>Python 3.4.3 (default, Nov 17 2016, 01:08:31)</p>
  </blockquote>
  
  <p>Strangely enough many trivial toy example x and y arrays are giving me expected figures.</p>
  
  <p>For e.g the follwowing snippet shows the expected graph with correct x-axis tick labels</p>
  
  <pre><code>x=[20,30,90,70, 50, 60, 80, 70]
  y=[3,2,5,10, 3, 9, 7, 6]
  plt.bar(x,y)
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/c7sca.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c7sca.png" alt="correct result for above example"></a></p>
  
  <p>What obvious thing am i missing here ?</p>