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

Robert Kern robert.kern at gmail.com
Wed Feb 1 12:21:35 CST 2006

iCy-fLaME wrote:
> 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)
> =================================

Did you see an error message, or did it just do nothing? What version of Numeric
do you have installed? I'm pretty sure the Gnuplot module still uses Numeric and
may not recognize numpy arrays. Hopefully, it will try to do something like
Numeric.asarray(x). If Numeric's version is >=24.0, that should automatically
convert the numpy array to a Numeric array efficiently.

Robert Kern
robert.kern at gmail.com

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter

More information about the SciPy-user mailing list