I have a trouble when displat a PNG file which generated from matplotlib
here is the script from
http://www.scipy.org/Cookbook/Matplotlib/Using_MatPlotLib_in_a_CGI_script
there is no image in the web browser, is there anything wrog with the
script?
please help me, I am a newbie in matplotlib ;)
--<start>
#!/usr/bin/python
import pylab
import matplotlib
import os,sys
import cgi
import cgitb
cgitb.enable()
os.environ['HOME']='/tmp/'
matplotlib.use('Agg')
form = cgi.FieldStorage()
pylab.plot([1,2,3])
print "Content-Type: image/png\n"
pylab.savefig(sys.stdout,format='png')
--</end>
and then here is my computer specification
CentOS 5.1 -- Linux localhost.localdomain 2.6.18-53.el5 #1 SMP Mon Nov 12
02:22:48 EST 2007 i686 i686 i386 GNU/Linux
python-2.4.3-19.el5
numpy-1.0.3.1-1.el5.kb
scipy-0.6.0-6.el5
matplotlib 0.91.4
--
Zainal Abidin, S.Si
Sub Bidang Informasi Meteorologi Publik
Badan Meteorologi dan Geofisika
Jl. Angkasa I No. 2
Jakarta - Indonesia
Visit Indonesia Year 2008 - Celebrating 100 Years of National Awakening
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users