Trouble with show()

Hello - I've been searching around for a good plotting package for
python; matplotlib seems great - the problem is, I can't get anything
to show().

I'm on os x 10.4.8, python 2.4.
I've installed (and uninstalled and installed) matplotlib via darwin ports:

novelbox:~/dev/py/work knot$ sudo port installed | grep matplot
py-matplotlib @0.87.6_0 (active)

I can execute this from the interactive python prompt:

Python 2.4.3 (#1, Mar 30 2006, 11:02:16)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin

from pylab import *
plot([1,2,3])

[<matplotlib.lines.Line2D instance at 0x2bdf800>]

show()

but I don't get any output window...
Same for executing this snippet from the shell:

novelbox:~/dev/py/work knot$ cat matplot.py

from pylab import *
plot([1,2,3])
show()
raw_input()

novelbox:~/dev/py/work knot$ python matplot.py --verbose-helpful

matplotlib data path /opt/local/lib/python2.4/site-packages/matplotlib/mpl-data
$HOME=/Users/knot
CONFIGDIR=/Users/knot/.matplotlib
loaded rc file /opt/local/lib/python2.4/site-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 0.87.6
verbose.level helpful
interactive is False
platform is darwin
numerix numarray 1.5.1
font search path ['/opt/local/lib/python2.4/site-packages/matplotlib/mpl-data']
loaded ttfcache file /Users/knot/.matplotlib/ttffont.cache
backend Agg version v2.2

I found nothing in the FAQ or mailing list archive similar to this problem.
I must be doing something dumb, but without an error I'm a bit perplexed.

Can anyone please point me in a direction that might help me solve this?

TIA

CS wrote:

Hello - I've been searching around for a good plotting package for
python; matplotlib seems great - the problem is, I can't get anything
to show().

I'm on os x 10.4.8, python 2.4.
I've installed (and uninstalled and installed) matplotlib via darwin ports:

novelbox:~/dev/py/work knot$ sudo port installed | grep matplot
py-matplotlib @0.87.6_0 (active)

I can execute this from the interactive python prompt:

Python 2.4.3 (#1, Mar 30 2006, 11:02:16)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
  

from pylab import *
plot([1,2,3])
        

[<matplotlib.lines.Line2D instance at 0x2bdf800>]
  

show()
        
but I don't get any output window...
Same for executing this snippet from the shell:

novelbox:~/dev/py/work knot$ cat matplot.py

from pylab import *
plot([1,2,3])
show()
raw_input()

novelbox:~/dev/py/work knot$ python matplot.py --verbose-helpful

matplotlib data path /opt/local/lib/python2.4/site-packages/matplotlib/mpl-data
$HOME=/Users/knot
CONFIGDIR=/Users/knot/.matplotlib
loaded rc file /opt/local/lib/python2.4/site-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 0.87.6
verbose.level helpful
interactive is False
platform is darwin
numerix numarray 1.5.1
font search path ['/opt/local/lib/python2.4/site-packages/matplotlib/mpl-data']
loaded ttfcache file /Users/knot/.matplotlib/ttffont.cache
backend Agg version v2.2

I found nothing in the FAQ or mailing list archive similar to this problem.
I must be doing something dumb, but without an error I'm a bit perplexed.

Can anyone please point me in a direction that might help me solve this?

TIA
  

You're using the Agg backend, which has no GUI. It can only produce image (i.e. png) files, which you can save to disk with the savefig command and then display with an external viewer.

Try a GUI backend such as TkAgg if you want the show command to open a window. See http://matplotlib.sourceforge.net/backends.html for information on how to change your default backend.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg