>>>>> "Luis" == Luis P Mendes <lu***@iname.com> writes:
Luis> I'm developing a program in Python, with no gui, and now
Luis> I've reached a point where I would need to plot list of
Luis> elements on a graph.
Luis> How can I do it? preferably in a simple way?
matplotlib has non GUI-outputs. You select these by choosing your
"backend". There are two ways of doing this, from the prompt or in a
configuration file. Let's say you have a script to plot a list
from matplotlib.matlab import *
plot([1,2,3])
savefig('somefile')
If you run this script as
python myscript.py -pPS # generate postscript somefile.ps
python myscript.py -pSVG # generate SVG somefile.svg
python myscript.py -pAGG # generate somefile.png
If you know you always want to generate png for example, you can set
this by default and don't have to supply the command line option.
matplotlib also has a GUI mode, but you don't need it.
homepage :
http://matplotlib.sourceforge.net
screenshots :
http://matplotlib.sourceforge.net/screenshots.html
tutorial :
http://matplotlib.sourceforge.net/tutorial.html
John Hunter