An example of scitools in Sagenb

11 views
Skip to first unread message

chu-ching huang

unread,
Apr 27, 2010, 6:38:18 AM4/27/10
to scitools
I had posted a simple example, "Brownian bridgesimulation", which
shows the feature of making animation via scitools,

link: http://www.sagenb.org/home/pub/1993/

chu-ching huang

--
You received this message because you are subscribed to the Google Groups "scitools" group.
To post to this group, send email to scit...@googlegroups.com.
To unsubscribe from this group, send email to scitools+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scitools?hl=en.

Johannes Ring

unread,
Apr 28, 2010, 3:11:02 AM4/28/10
to scit...@googlegroups.com
On Tue, Apr 27, 2010 at 12:38 PM, chu-ching huang
<cch...@mail.cgu.edu.tw> wrote:
> I had posted a simple example, "Brownian bridgesimulation", which
> shows the feature of making animation via scitools,
>
> link: http://www.sagenb.org/home/pub/1993/

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

chu-ching huang

unread,
Apr 28, 2010, 8:37:12 AM4/28/10
to scitools

>
> 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.

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.

Best regards,

chu-ching huang

Johannes Ring

unread,
Apr 29, 2010, 3:22:21 AM4/29/10
to scit...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages