title: \overline{} in Matplotlib Not Working
body: <p>Background: here is a minimum working example that produces the error:</p>
  
  <pre><code>from matplotlib import pyplot as plt
  
  plt.plot([0,1,2],[0,1,2],label=r"$\alpha$")
  plt.plot([0,1,2],[0,1,2],label=r"$\overline{a}$") #This is the offending line
  plt.legend(loc='best')
  plt.show()
  </code></pre>
  
  <p>Running this produces the following error message after a fairly long <code>Traceback</code> list:</p>
  
  <pre><code>pyparsing.ParseFatalException: Expected end of math '$'
  $\overline{a}$ (at char 0), (line:1, col:1)
  </code></pre>
  
  <p>I also got this warning which I am not sure is connected with my problem since it happens whether or not I include the "offending line" in my script:</p>
  
  <pre><code>/usr/lib64/python2.6/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['cmb10'] not found. Falling back to Bitstream Vera Sans  (prop.get_family(), self.defaultFamily[fontext]))
  /usr/lib64/python2.6/site-packages/matplotlib/font_manager.py:1252: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=12. Returning /usr/share/fonts/un-core/UnDotum.ttf  UserWarning)
  /usr/lib64/python2.6/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['cmtt10'] not found. Falling back to Bitstream Vera Sans  (prop.get_family(), self.defaultFamily[fontext]))
  /usr/lib64/python2.6/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['cmss10'] not found. Falling back to Bitstream Vera Sans  (prop.get_family(), self.defaultFamily[fontext]))
  </code></pre>
  
  <p>If I do not include the "offending line" as I've specified it to be above then everything works fine. I've tried a variety of things not shown here which have led me to conclude that the problem centers around <code>\overline{}</code>.  However, I do not know why it isn't working, since the <a href="http://matplotlib.org/users/mathtext.html#mathtext-tutorial" rel="nofollow">documentation</a> says that <code>\overline{}</code> should work once it is put inside <code>$$</code>.</p>
  
  <p>Previously I have used <code>plt.rc('text',usetex=True)</code> to fix this but now I am working on plots that I plan on including in a publication and I am working on fine-tuning the font size and style for best readability and using <code>plt.rc('text',usetex=True)</code> forces my tick labels to use the default LaTeX font instead of the one I want to use.</p>
  
  <p>Python version: 2.6.6</p>