I would like to place a mathematical symbol on a plot by using the appropriate 
code bracketed by dollar signs, e.g., $\alpha$. This is the technique used in 
the program  pyplot_mathtext.py described at 
http://matplotlib.org/users/mathtext.html#mathtext-tutorial. When I run this 
probram I get the error messages shown below. What do I need to do to fix this 
problem? I'm using matplotlib 1.3.1 and Python 2.6.

>python pyplot_mathtext.py
Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__
    return self.func(*args)
  File "C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 276, in resize
    self.show()
  File "C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py",
line 348, in draw
    FigureCanvasAgg.draw(self)
  File "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", line
451, in draw
    self.figure.draw(self.renderer)
  File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 55, in
draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "C:\Python26\lib\site-packages\matplotlib\figure.py", line 1034, in draw
    func(*args)
  File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 55, in
draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "C:\Python26\lib\site-packages\matplotlib\axes.py", line 2086, in draw
    a.draw(renderer)
  File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 55, in
draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "C:\Python26\lib\site-packages\matplotlib\text.py", line 547, in draw
    bbox, info, descent = self._get_layout(renderer)
  File "C:\Python26\lib\site-packages\matplotlib\text.py", line 329, in
_get_layout
    ismath=ismath)
  File "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", line
210, in get_text_width_height_descent
    self.mathtext_parser.parse(s, self.dpi, prop)
  File "C:\Python26\lib\site-packages\matplotlib\mathtext.py", line 3009, in
parse
    self.__class__._parser = Parser()
  File "C:\Python26\lib\site-packages\matplotlib\mathtext.py", line 2193, in
__init__
    - ((lbrace + float_literal + rbrace)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
>Exit code: 0



------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to