Latex \partial

Hi,
I am a newbie in matplotlib. I want to use the following label (in latex)
\langle \partial_x U(x) \rangle.
When i use
           ylabel(r"$\langle \partial_x U(x) \rangle$",fontsize=30);
matplotlib complains by saying

     Traceback (most recent call last):
  File
"/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py", line
277, in expose_event
    self._render_figure(width, height)
  File
"/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtkagg.py",
line 91, in _render_figure
    FigureCanvasAgg.draw(self)
  File
"/usr/lib/python2.3/site-packages/matplotlib/backends/backend_agg.py", line
369, in draw
    self.figure.draw(renderer)
  File "/usr/lib/python2.3/site-packages/matplotlib/figure.py", line 498, in
draw
    for a in self.axes: a.draw(renderer)
  File "/usr/lib/python2.3/site-packages/matplotlib/axes.py", line 1362, in
draw
    self.yaxis.draw(renderer)
  File "/usr/lib/python2.3/site-packages/matplotlib/axis.py", line 578, in
draw
    self.label.draw(renderer) # memory leak here, vertical text
  File "/usr/lib/python2.3/site-packages/matplotlib/text.py", line 334, in
draw
    bbox, info = self._get_layout(renderer)
  File "/usr/lib/python2.3/site-packages/matplotlib/text.py", line 179, in
_get_layout
    w,h = renderer.get_text_width_height(
  File
"/usr/lib/python2.3/site-packages/matplotlib/backends/backend_agg.py", line
242, in get_text_width_height
    width, height, fonts = math_parse_s_ft2font(
  File "/usr/lib/python2.3/site-packages/matplotlib/mathtext.py", line 1222,
in math_parse_s_ft2font
    handler.expr.set_size_info(fontsize, dpi)
  File "/usr/lib/python2.3/site-packages/matplotlib/mathtext.py", line 870,
in set_size_info
    self.elements[0].set_size_info(self._scale*fontsize, dpi)
  File "/usr/lib/python2.3/site-packages/matplotlib/mathtext.py", line 795,
in set_size_info
    Element.set_size_info(self, fontsize, dpi)
  File "/usr/lib/python2.3/site-packages/matplotlib/mathtext.py", line 708,
in set_size_info
    element.set_size_info(self.fontsize, dpi)
  File "/usr/lib/python2.3/site-packages/matplotlib/mathtext.py", line 796,
in set_size_info
    self.metrics = Element.fonts.get_metrics(
  File "/usr/lib/python2.3/site-packages/matplotlib/mathtext.py", line 409,
in get_metrics
    cmfont, metrics, glyph, offset = \
  File "/usr/lib/python2.3/site-packages/matplotlib/mathtext.py", line 429,
in _get_info
    raise ValueError('unrecognized symbol "%s"' % sym)
ValueError: unrecognized symbol "\partial"

  I searched the forum for something similar and could not find anything.
Also my latex can typeset the above if i run it in a separate tex file. I
am using the GTKAgg backend.

Could someone please help me out?

Bye
Vijay

···

--
View this message in context: http://www.nabble.com/Latex-\partial-tf2963980.html#a8292755
Sent from the matplotlib - users mailing list archive at Nabble.com.