On Wed, Apr 28, 2010 at 2:37 PM, chu-ching huang
<
cch...@mail.cgu.edu.tw> wrote:
>
>>
>> Cool!
>>
>> I see you are using the VTK backend for the curve plot. Any reason for
>> that? I tried your example with the the Gnuplot backend and I got this
>> error: "thread.error: can't start new thread". Is that why you are
>> using the VTK backend? I'm just curious :-)
>>
>> Johannes
>>
>
> Mayavi was introduced at the same time when scitools was introduced in
> our lecture for senior students in our campus Almost students have the
> experience about working with matlab. It is a good chance to show them
> there are many execellent replacements for the proprietary software,
> for instance: python and its packages, scitools, mayavi etc. VTK is
> used as the backend of mayavi. In the live Linux made for students,
> "VTK" was set as defaulted and .scitools.cfg was put in root directory
> since then. This is why this example always uses VTK backend.
I see.
> Today I upgraded sage to 4.4 in the live system and tested other
> scitools backends too. Here, some results I got:
>
> 1) matplotlib backend: native matplotlib (0.99.1) has no _tkagg.so. I
> rebuild matplotlib (0.99.1.1) outside sage and replace the original
> sage-matplotlib. The example works well.
> 2) gnuplot backend: just as you had known.
You say you are also getting the thread error when using the Gnuplot
backend? In that case I would suggest to move some of the plotting
outside the loop. That is, you can do
plot(t, X0, 'r-6', axis=(0, 1, -2, 2), xlabel='t', ylabel='Xt', hold='on')
before the start of the loop and then simply do
plot(t, Xt)
inside the loop.
Best regards,
Johannes