title: Matplotlib multiple plots x axis
body: <p>I am having a problem with labelling the X-axis of a multiple plot graph. My current code is as follows:</p>
  
  <pre><code>X=range(0, len(departments), 1)
  
  fig = plt.figure()
  ax1 = fig.add_subplot(111)
  
  ax1.bar(X, department_employees_current, color='b')
  ax1.bar(X, department_employees_left, color='r', bottom=department_employees_current)
  ax1.set_ylabel('Employees current &amp; left')
  
  ax2 = ax1.twinx()
  ax2.plot(X, department_percentage_attrition, color='r')
  ax2.set_ylabel('% Attrition')
  
  ax2.set_xticklabels(departments)
  </code></pre>
  
  <p>I am getting all the X-label axis crammed together:
  <a href="https://i.stack.imgur.com/35YcQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/35YcQ.png" alt="enter image description here"></a></p>