I've a python script who generate a graphic with gnuplot. But I've an error:
gnuplot> plot ^ line 0: function to plot expected
g=Gnuplot.Gnuplot(persist=1)
g.title('Read&Write Performance')
g.xlabel('minutes')
g.ylabel('MB/s')
g('set term png')
g('set out')
g('set yrange [0:70]')
d1=Gnuplot.Data(self.time,self.list1,title="perfr", with_="line")
d2=Gnuplot.Data(self.time,self.list2,title="perfw", with_="line")
time.sleep(2)
g.hardcopy('bench.png',terminal = 'png')
g.reset()
self.list1= [12, 15, 17] self.list2 = [43, 48, 49]
I don't understand why I've this error.
Thanks :)
time.sleeplooks a little suspect. Is there a way of seeing the code that gets sent to gnuplot? It might be easier to see what is wrong with that. Also, it looks like this project hasn't been updated for quite a long time - it is conceivable that it isn't compatible with recent versions of gnuplot. You might find it easier to use matplotlib instead.test.pymakes me think that you should have a line in there like...g.plot(d1)... If you want them to show up together, I don't know how it works ...