I have trouble getting any symbols or any super/sub scripts to work
since I upgraded to 1.0 a few months ago.  I always get a message
saying that some font isn't found.  This occurs whenever I try to put
symbols, superscripts, or subscripts in a label, or when I use a log
scale (because then it MPL has to use superscripts).  I have tried
changing my matplotlibrc file but haven't found any combination of
settings that help.

To illustrate the problem, I have included three files, one python
file and the other the error as captured from the output as well as my
matplotlibrc file.  The python file is trivial:

# -------------------------------------------------
import matplotlib.pyplot as pyplot

pyplot.plot([1,2,3], label='$\alpha > \beta$')

pyplot.legend()
pyplot.show()
# -------------------------------------------------

Can someone please help me figure out what is wrong?  I'm on a Mac
running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.

Thanks,
Jeremy
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['STIXGeneral'] not found. Falling back to 
Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/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.0. 
Returning 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
  UserWarning)
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['STIXSizeOneSym'] not found. Falling back 
to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1252:
 UserWarning: findfont: Could not match :family=Bitstream Vera 
Sans:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0. 
Returning 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
  UserWarning)
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['STIXSizeThreeSym'] not found. Falling 
back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['STIXSizeFourSym'] not found. Falling back 
to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['STIXSizeFiveSym'] not found. Falling back 
to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['STIXSizeTwoSym'] not found. Falling back 
to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1252:
 UserWarning: findfont: Could not match :family=Bitstream Vera 
Sans:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0. 
Returning 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf
  UserWarning)
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['STIXNonUnicode'] not found. Falling back 
to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/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]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/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]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['cmmi10'] not found. Falling back to 
Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['cmex10'] not found. Falling back to 
Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['cmsy10'] not found. Falling back to 
Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/font_manager.py:1242:
 UserWarning: findfont: Font family ['cmr10'] not found. Falling back to 
Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/Library/Frameworks/Python.framework/Versions/2.6/lib/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]))
Exception in Tkinter callback
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py",
 line 1410, in __call__
    return self.func(*args)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/Tkinter.py",
 line 495, in callit
    func(*args)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py",
 line 266, in idle_draw
    self.draw()
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_tkagg.py",
 line 251, in draw
    FigureCanvasAgg.draw(self)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_agg.py",
 line 394, in draw
    self.figure.draw(self.renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py",
 line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/figure.py",
 line 798, in draw
    func(*args)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py",
 line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/axes.py",
 line 1934, in draw
    a.draw(renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/artist.py",
 line 55, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/legend.py",
 line 412, in draw
    bbox = self._legend_box.get_window_extent(renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py",
 line 224, in get_window_extent
    w, h, xd, yd, offsets = self.get_extent_offsets(renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py",
 line 316, in get_extent_offsets
    whd_list = [c.get_extent(renderer) for c in self.get_visible_children()]
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py",
 line 217, in get_extent
    w, h, xd, yd, offsets = self.get_extent_offsets(renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py",
 line 376, in get_extent_offsets
    whd_list = [c.get_extent(renderer) for c in self.get_visible_children()]
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py",
 line 217, in get_extent
    w, h, xd, yd, offsets = self.get_extent_offsets(renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py",
 line 316, in get_extent_offsets
    whd_list = [c.get_extent(renderer) for c in self.get_visible_children()]
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py",
 line 217, in get_extent
    w, h, xd, yd, offsets = self.get_extent_offsets(renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py",
 line 376, in get_extent_offsets
    whd_list = [c.get_extent(renderer) for c in self.get_visible_children()]
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/offsetbox.py",
 line 641, in get_extent
    bbox, info = self._text._get_layout(renderer)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/text.py",
 line 307, in _get_layout
    ismath=ismath)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/backends/backend_agg.py",
 line 176, in get_text_width_height_descent
    self.mathtext_parser.parse(s, self.dpi, prop)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mathtext.py",
 line 2940, in parse
    box = self._parser.parse(s, font_output, fontsize, dpi)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mathtext.py",
 line 2345, in parse
    self._expression.parseString(s)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 1048, in parseString
    loc, tokens = self._parse( instring, 0 )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 981, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 924, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 2559, in parseImpl
    return self.expr._parse( instring, loc, doActions, callPreParse=False )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 981, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 924, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 2307, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 981, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 924, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 2672, in parseImpl
    loc, tokens = self.expr._parse( instring, loc, doActions, 
callPreParse=False )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 981, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 924, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 2307, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 981, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 924, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 2416, in parseImpl
    ret = e._parse( instring, loc, doActions )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 981, in _parseCache
    value = self._parseNoCache( instring, loc, doActions, callPreParse )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pyparsing.py",
 line 950, in _parseNoCache
    tokens = fn( instring, tokensStart, retTokens )
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mathtext.py",
 line 2047, in raise_error
    raise ParseFatalException(msg + "\n" + s)
ParseFatalException: Expected end of math '$'
$lpha > eta$ (at char 0), (line:1, col:1)

Attachment: mathfont.py
Description: Binary data

Attachment: matplotlibrc
Description: Binary data

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to