title: matplotlib tex label adds/removes whitespace
body: <p>I have a plot where the y label has a superscript for the order of magnitude in it which I produce with the following line:</p>
  
  <pre><code># plt is acquired from matplotlib.pyplot
  # orderMagnitude is a variable taken from a different part of the code
  plt.ylabel('${\mathrm{Intensity (10^'+str(int(orderMagnitude))+')}}$')
  </code></pre>
  
  <p>The <code>{\mathrm{..}}</code> part was added because without it the whole text would be italic (except for the actual numbers). The line that I have now seems to remove the white space between the y (of intensity) and the opening '(' however and seems to add some whitespace after the orderMagnitude (see picture).</p>
  
  <p><img src="https://i.stack.imgur.com/KeC9K.png" alt="enter image description here"></p>
  
  <p>Does anyoneone know why this occurs?</p>