mathtext

John,

The following example works ok with WXAgg (Hoorray!) but the exponent 4 at the end of the expression does not show up (with or without brackets).

Also, an anoying thing is the need for spaces around TeX markup. The same expression does not get formatted by mathtext if you remove the spaces. This is going to confuse TeX users since LaTeX doesn’t need spaces.

one last thing: after you close the WXAgg figure, the execution does not return to the interpreter. This does not happen on GTK.

cheers,

Flavio

Python 2.3 (#2, Aug 31 2003, 17:27:29)

[GCC 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk)] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

import matplotlib

matplotlib.use(‘WXAgg’)

from matplotlib.matlab import *

plot([1,10],’.’)

[<matplotlib.lines.Line2D instance at 0x41765fac>]

title(r’$dy_2 / dt = p_{11} \times y_{2}^{4} $’)

<matplotlib.text.Text instance at 0x41765f0c>

title(r’$dy_2 / dt = p_{11} \times y_{2} ^{4} $’)

<matplotlib.text.Text instance at 0x41765f0c>

show()

fiocruz4.jpg
Flávio Codeço Coelho, PhD

Programa de Computação Científica

Fundação Oswaldo Cruz

Rio de Janeiro – Brasil

···