title: How can I make xtick different from xlim in Python matplotlib?
body: <p>I want to make a dynamic plot every day for year process with Python.</p>
  
  <p>The X axis of the axes will be 12 month, and the process will be a barh in Matplotlib, as code below:</p>
  
  <pre><code>import random
  import datetime
  import matplotlib.pyplot as plt
  
  def get_percent():
      today = datetime.date.today()
      start = datetime.date(today.year, 1, 1)
      diff = today - start
      percent = diff.days/365.0
      return percent
  
  fig = plt.figure(figsize=(8,2))
  ax = fig.add_subplot(1,1,1)
  percent = get_percent()
  
  ax.axis([0, 12, 0, 1])
  month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug','Sep', 'Nov', 'Dec']
  ax.set_xticklabels(month)
  ax.set_xlim(0, 100)
  ax.barh(bottom=0.5,width=int(percent*100),height=0.2)
  
  plt.show()
  plt.close()
  </code></pre>
  
  <p>But after plot, the xtick show july to be 100% of the year, which is not I want.</p>
  
  <p><a href="https://i.stack.imgur.com/8IMjw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8IMjw.png" alt="enter image description here"></a></p>
  
  <p>I searched the doc of matplotlib, but did not find the answer :(. How can I make the x axis tick show Jan - Dec, and the barh show the percentage of the year?</p>