title: Unable to reverse xticks inside matplotlib subplot
body: <p>I have designed a subplot using <code>matplotlib</code>. I am trying to reverse the <code>xticks</code> of the plot. Please see the sample code-</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  # generate the data
  n = 6
  y = np.random.randint(low=0, high=10, size=n)
  x = np.arange(n)
  
  # generate the ticks and reverse it
  xticks = range(n)
  xticks.reverse()
  
  # plot the data
  plt.figure()
  ax = plt.subplot(111)
  ax.bar(x, y)
  print xticks # prints [5, 4, 3, 2, 1, 0]
  ax.set_xticks(xticks)
  plt.show()
  </code></pre>
  
  <p>Please see below the generated plot-
  <a href="https://i.stack.imgur.com/DdkzY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DdkzY.png" alt="enter image description here"></a></p>
  
  <p>Please pay attention to the <code>xticks</code>. Even though, <code>ax.set_xticks(xticks)</code> is used but the <code>xticks</code> haven't changed. Am I missing some function call to rerender the plot?</p>
  
  <p>Below is the system information-</p>
  
  <pre><code>matplotlib.__version__
  '2.1.1'
  
  matplotlib.__version__numpy__
  '1.7.1'
  
  python --version
  Python 2.7.15rc1
  </code></pre>
  
  <p><strong>Please note that I just want to reverse the ticks and do not want to invert axis.</strong></p>