Windows defaults and the first example in the tutorial

I was thinking about the first example in the tutorial. On windows, TkAgg is the default backend, at least for the precompiled windows version. If Idle is run with -n, the show() command must be omitted, or the window will not render. Interactive2.py will try to render the window and then hang, as will pycrust. I think the first thing a newbie to matplotlib wants to do is open their favorite shell interface and make sure they can reproduce the first example in the tutorial.

Darren

Darren S. Dale
dd55@...163...

PGP public key available

I was thinking about the first example in the tutorial. On windows, TkAgg
is the default backend, at least for the precompiled windows version. If
Idle is run with -n, the show() command must be omitted, or the window will
not render.

Not in my experience. What's the command sequence you're executing?

Interactive2.py will try to render the window and then hang,

I think interactive2.py is for GTK. It's a bad idea to use it with
TkAgg since TkAgg is Tcl/Tk based.

as will pycrust.

I think PyCrust is WxWindows based. It's also a bad idea to use with
TkAgg. In general, multiple GUIs in the same process is a bad idea.

I think the first thing a newbie to matplotlib wants to do is
open their favorite shell interface and make sure they can reproduce the
first example in the tutorial.

I gotta admit, shell confusion/compatibility is out of hand. For
TkAgg, the only windows shells I recommend are python (not pythonwin!),
idle -n, and IPython. Anything else either doesn't work or hasn't been
tested.

Regards,
Todd

ยทยทยท

On Wed, 2004-04-28 at 11:50, Darren Dale wrote:

Darren Dale wrote:
> I was thinking about the first example in the tutorial. On windows, TkAgg
> is the default backend, at least for the precompiled windows version. If
> Idle is run with -n, the show() command must be omitted, or the window will
> not render.

Todd Miller wrote:
Not in my experience. What's the command sequence you're executing?

Sorry guys, I made a mistake here. I was pasting

from matplotlib.matlab import *
plot([1,2,3,4])
show()

as a block right into Idle -n. Running the commands one at a time does work.

I've maybe posted too many times today (:-/), but I have one last comment before I settle in to look at all the nice demos that you awesome dudes have put together. I didnt know these demos existed, I didnt find them on my file system when I searched through the folders that the windows .exe had installed. I downloaded the .zip package and extracted the samples from there, then did a windows search to see if i just hadnt been looking in the right place. The results: it found the examples from the zip file in C:\[path]\examples, and it found another set of examples in matplotlib-0.53.1/examples. But note: there is no mention of C:\... for this set of files, and they dont show up in windows explorer.