Hi,
It looks like you are passing Python file handle to g.plot().
If you are trying to plot data in a file, I think it expects
Gnuplot.File object. I don't know if it will handle a string of
filename automatically, since a string could be an equation as well.
Look at help(g.plot) and help(Gnuplot.File) for more information.
Regards,
Andrzej
> From: Shibnath Pathak <shi...@gm...>
> To: gnu...@li...
> Subject: [Gnuplot-py-users] problem with calling a file.
> Date: Wed, 16 Dec 2009 10:50:25 +0100
>
> Hi,
>
> I am new to python and gunplot.py . But I am quite familiar with Gnuplot. So
> in Gnuplot to plot a file I used " gnuplot> plot "filename" using 1:2 with
> lines ". The file is in text form and the data are saving there in two
> column 1st one is x axis and 2nd one is Y axis.
>
> In Gnuplot.py I try to plot same file like this "
>
> from numpy import *
> import Gnuplot, Gnuplot.funcutils
> g = Gnuplot.Gnuplot(debug=1)
> g.title('A simple example') # (optional)
> f = open('filename', 'r' )
> g.plot(f, using = (1,2), with_='lines')
> raw_input('Please press return to continue...\n')
>
>
> But I didn't get any plot.
> So please help me.
>
> Thank you in advance.
>
> --
> Shibnath Pathak
|