 # Xlator and Mathtext

John,

for i in range(len(eqlist)):
print eqlist
a.text(1,9-i,eqlist[i], fontsize=15)


here is the output of the print eqlist:

['$dY_0/dt = -(p_{0}+p_{3})\\times y_{0}+p_{2}\\times y_{1}+p_{4}\\times y_{2}$', '$dY_1/dt = -p_{2}\\times y_{1}$', '$dY_2/dt = p_{3}\\times y_{0}-p_{4}\\times y_{2}$']
['$dY_0/dt = -(p_{0}+p_{3})\\times y_{0}+p_{2}\\times y_{1}+p_{4}\\times y_{2}$', '$dY_1/dt = -p_{2}\\times y_{1}$', '$dY_2/dt = p_{3}\\times y_{0}-p_{4}\\times y_{2}$']
['$dY_0/dt = -(p_{0}+p_{3})\\times y_{0}+p_{2}\\times y_{1}+p_{4}\\times y_{2}$', '$dY_1/dt = -p_{2}\\times y_{1}$', '$dY_2/dt = p_{3}\\times y_{0}-p_{4}\\times y_{2}$']


Please notice that eqlist gets printed three times because of the for loop.

the other thing you asked me, worked fine:

>>> import matplotlib
>>> matplotlib.use('WXAgg')
>>> from matplotlib.matlab import *
>>> plot([0,10],'w.')
[<matplotlib.lines.Line2D instance at 0x416ee18c>]
>>> title('$\\alpha$')
<matplotlib.text.Text instance at 0x416ee0ec>
>>> show()


this worked fine on the console.

by the way, this is the only function in which I have problems with mathtext. All my other plotting functions, using the same backend, WXAgg, work as expected.

since this is an embedded in wx figure, when I chaged the backend from WX to WXAgg, I changed the use line:

matplotlib.use('WXAgg')


But I didn’t change this:

from matplotlib.backends.backend_wx import Toolbar, FigureCanvasWx, FigureManager


do you think this can be the problem? If So How should I change it to make it right? Flávio Codeço Coelho, PhD

Programa de Computação Científica

Fundação Oswaldo Cruz

Rio de Janeiro – Brasil

···