title: matplotlib set_xticklabels shift 1 position
body: <p>I have list of number</p>
  <pre class="lang-py prettyprint-override"><code>scores = [0.4126984126984127,
   0.9841269841269841,
   0.9841269841269841,
   0.3333333333333333,
   0.6825396825396826,
   0.7301587301587301,
   0.9841269841269841,
   0.4603174603174603,
   1.0]
  
  names = [&quot;Nearest Neighbors&quot;, &quot;Linear SVM&quot;, &quot;RBF SVM&quot;, &quot;Gaussian Process&quot;,
           &quot;Decision Tree&quot;, &quot;Random Forest&quot;, &quot;Neural Net&quot;, 
           &quot;AdaBoost&quot;,
           &quot;Naive Bayes&quot;
          ]
  </code></pre>
  <p>I would like to plot the y-axis the scores and x-axis names of them then.</p>
  <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt
  fig, axs = plt.subplots()
  axs.plot(scores)
  axs.set_xlabel(&quot;classifier names&quot;)
  axs.set_ylabel(&quot;Score&quot;)
  axs.set_xticklabels(names, rotation=90)
  </code></pre>
  <p>I got warning and the x-axis is shift by one and I lost it!
  <a href="https://i.stack.imgur.com/vX403.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vX403.png" alt="enter image description here" /></a></p>
  <p>In the picture nearest neighbor is lost and the rest of them are shifted</p>
  <p><strong>Question</strong></p>
  <p>How to solve this error?</p>