title: Matplotlib Axes Offset
body: <p>Thanks in advance for your help.</p>
  
  <p>I'm trying to rotate the axes for two overlayed plots. When I set the rotation to vertical then it lines up with the correct columns but when I rotate the x-axes then they become offset.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>ax = plt.subplot(111)
  
  ax.bar(range(1, 24, 3), gender_factors[1:2][[i for i in range(8)]].values.T, tick_label=traits_8, align = 'center', color = '#00cccc', label='Men')
  ax.bar(range(0, 24, 3), gender_factors[2:3][[i for i in range(8)]].values.T, tick_label=traits_8, align = 'center', color = '#990033', label='Women')
  
  plt.title('Personality Traits by Gender')
  
  ax.set_xticklabels(traits_8, rotation=60) 
  
  plt.xticks(range(0, 24, 3), traits_8, rotation='vertical')
  
  plt.legend()
  plt.show()
  </code></pre>
  
  <p>How can I fix the offset-ness? I've tried playing with range(0,24,3) to get it right but it isn't working.</p>
  
  <p><a href="https://i.stack.imgur.com/2wNw3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2wNw3.png" alt="vertical"></a>
  <a href="https://i.stack.imgur.com/GZMdH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GZMdH.png" alt="45-degrees"></a></p>