|
From: Simon H. <sim...@jp...> - 2005-03-11 08:50:42
|
Hi,
The code below when run from a file in the cgi-bin directory should
generate a plot but it does not work:
#!d:/apps/Python23/python
import sys
import matplotlib
matplotlib.use('Agg')
from pylab import *
plot([1,2,3,4])
#print "Content-type: text/html\n\n"
#print "<html>Hello world!</html>"
print "Content-type: image/png\n\n"
print savefig(sys.stdout)
However, it does not work and I am really struggling to get matplotlib
to generate a plot dynamically in a cgi-script. If anyone has done this
successfully I would really appreciate some help or a simple example. I
am using Windows XP and Apache 2.0.53.
Many thanks,
Simon
|