title: Set units to X-axis in matplotlib
body: <p>I use this code for add units to axes, but x-axis looks horrible, numbers and units are overwritten. DO you have any idea how to solve it? </p>
  
  <pre><code>plt.gca().xaxis.set_major_formatter(FormatStrFormatter('%d cm'))
  plt.gca().yaxis.set_major_formatter(FormatStrFormatter('%d cm'))
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/553MM.png" alt="enter image description here"></p>