Problems "animated" plot

2. The above loop is the last part of my program. The

    > program terminates with

    > Fatal Python error: PyEval_RestoreThread: NULL
    > tstate

    > Apparently, this is done by my improper handling of
    > matplotlib. What's going wrong?

This is an annoyance we haven't been able to get rid of in all use
cases. animation using pylab and tkagg is one of the places. I
assume you are using the tkagg backend? If you search the mailing
list archives for PyEval_RestoreThread, you'll see this in many
contexts. For any semi-serious animation work, I suggest you not use
the matplotlib/interactive mode shown in anim.py but rather use your
GUI's idle handling or timer mechanism as in examples/anim_tk.py or
examples/dyamic_image_gtkagg.py.

Note that the gtkagg backend runs fine on windows and is the fastest
for animation, though installing the GTK runtime and pygtk takes a bit
more time.

    > 3. How can I achieve that dynamic autoscaling of the
    > y-axis? As noted in the source, "gcf().autoscale_view"
    > has no effect.

This is not legal matplotlib code -- I assume you mean
gca().autoscale_view(). In the absence of more information it is hard
top diagnose what the problem is. gca().autoscale_view() followed by
a draw command should rescale the axes to include all the data in x
and y. If you want to have only the y axis autoscaled and not the x
axis, I suggest writing a custom tick locator for the xaxis which
returns fixed axis ranges and ticks, and use whatever ticker you want
for the yaxis (eg the default). See examples/custom_ticker.py,
http://matplotlib.sourceforge.net/matplotlib.ticker.html and Chapter 5
of the users guide.

JDH