This works for me. Mind that data is a list of lists, while your y is just a list. Hence gnuplot plotted y as a function of its index, not of x. #!/usr/bin/env python import Gnuplot g = Gnuplot.Gnuplot() x = range(-5,6) data = [] for i in x: y.append(i*i) data.append([i,i*i]) g('set style data linespoint') #g('set xrange[-5:5]') g.plot(data) g.hardcopy("elephant.ps") For some reason Gnuplot.Gnuplot(persist = 1) does not work for me. However, I view my results with gv. For this set chuck~>cat .gv GV.antialias: True GV.watchFile: True GV.watchFileFrequency: 500 GV.version: gv 3.6.5.91 chuck~> Hope this helps Nicky 2009/8/1 Esmail <ebonak@hotmail.com>:
Well .. technically, this
x = range(-5,5)
should really be
x = range(-5,6)
but still doesn't solve the problem ...
_______________________________________________ SciPy-User mailing list SciPy-User@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-user