Gnuplot on Windows

Walter Moreira walterm at parque.homelinux.net
Fri Nov 22 12:24:42 EST 2002


On Thu, Nov 21, 2002 at 03:11:32PM +0000, Paul Simmonds wrote:
> Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>>import Gnuplot
> >>>a=Gnuplot.Gnuplot()
> >>>a.plot('1.dta') # A simple data file

I don't have too much experience with gnuplot, also.  But I think that
you should use the API given by the class Gnuplot, instead of writing
directly to the streams.

For example, 'a.plot' expects a list of coordinates or a 'Data' object.
You have to load your file in a list and then draw the plot from that
list:

   >>> a('set data style lines')
   >>> a.plot([(0,0), (1,1)])

Hope it helps.
Walter




More information about the Python-list mailing list