[SciPy-user] Failed to plot array using gnuplot-py

iCy-fLaME icy.flame.gm at gmail.com
Wed Feb 1 12:13:30 CST 2006


Not sure what is going on, dont even know if this is a glitch cause by
gnuplot-py or scipy or python itself, but here is what i found out on
my system.

Fedora Core 4
gnuplot-4.0.0-7
gnuplot-py-1.7-1
SciPy 0.4.4

It wouldnt plot if i do this:
=================================
from scipy import linspace
import Gnuplot
g = Gnuplot.Gnuplot(debug = 1)
x = linspace(0, 1, 20).astype('f')        # i.e. array(0.0, 0.05, 0.10, ... 1.0)
y = linspace(0, 5, 20).astype('f')
d = Gnuplot.Data(x, y)
g.plot(d)
=================================


However, if i convert the array into a list, then somehow it worked:
=================================
from scipy import linspace
import Gnuplot
g = Gnuplot.Gnuplot(debug = 1)
x = linspace(0, 1, 20).astype('f').tolist()
y = linspace(0, 5, 20).astype('f').tolist()
d = Gnuplot.Data(x, y)
g.plot(d)
=================================

--
iCy-fLaME
The body maybe wounded, but it is the mind that hurts.


More information about the SciPy-user mailing list