title: Putting names inside bars in a bar plot in python
body: <p>I have two lists, one of them is names, the other one is values. I want y axis to be values, x axis to be names. But names are too long to be put on axis, that's why I want to put them into bars, like on the picture, but bars should be vertical. <a href="https://i.stack.imgur.com/v1ZZh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v1ZZh.png" alt="enter image description here"></a></p>
  
  <p>On the picture, my namelist represent names of cities. </p>
  
  <p>My input is as such:</p>
  
  <pre><code>mylist=[289.657,461.509,456.257]
  nameslist=['Bacillus subtilis','Caenorhabditis elegans','Arabidopsis thaliana']
  </code></pre>
  
  <p>my code:</p>
  
  <pre><code>fig = plt.figure()
  width = 0.35
  ax = fig.add_axes([1,1,1,1])
  ax.bar(nameslist,mylist,width)
  ax.set_ylabel('Average protein length')
  ax.set_xlabel('Names')
  ax.set_title('Average protein length by bacteria')  
  </code></pre>
  
  <p>Any help appreciated!</p>