title: Set only positive xticks on a horizontal barplot
body: <p>I would like to set positives values on the x axis on a horizontal barplot, but I don't know how to do.</p>
  
  <p>A little example of my plot :
  <a href="https://i.stack.imgur.com/KWU3w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KWU3w.png" alt="enter image description here"></a></p>
  
  <p>I would like to replace -500 and -1000 with 500 and 1000 on the left of 0.</p>
  
  <p>And here my code, with y and y2 lists with values.</p>
  
  <pre><code>    y = [-i for i in y]
      plt.barh(range(1, len(y)+1), y, label="Serie_1")
      plt.barh(range(1, len(y2)+1), y2, alpha=0.5, color="r", label="Serie_2")
      plt.axvline(0, color="k")
      plt.yticks([i+1.5 for i in range(7)], range(7))
      plt.title("test")
      plt.legend()
  </code></pre>
  
  <p>I know that it's with xticks, but how ?</p>