I am trying to plot a simple graph using gnuplot and installed the gnuplot-py binding. I am using the script below and I am getting the below error -
gnuplot> set terminal aqua
line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list
I am running on a mac.
Here is the code I am using --
import numpy as np
import Gnuplot
def gnudemo2():
#Create some data
x = np.linspace(0,10,100)
y1 = x**2
y2 = 10*np.sin(np.pi*x)
#Instantiate Gnuplot object
g = Gnuplot.Gnuplot(persist=1)
g('set terminal png size 800,600 enhanced font "Helvetica,8" ')
g('set style data lines')
g('set output \'output1.png\'')
#Create the Gnuplot data
d1 = Gnuplot.PlotItems.Data(x, y1, with_='lp', title='d1')
d2 = Gnuplot.PlotItems.Data(x,y2, with_='l', title='d2')
g.plot(d1,d2)
# when executed, just run gnudemo2():
if __name__ == '__main__':
gnudemo2()
I am setting the terminal to png but still its trying to use the aqua term.
I installed the aquaterm as well. But it still would not work. What could be going on here?
If I use the same lines inside gnuplot on the command line, everything works fine. So I know the commands are correct. But something is missing when I run them through python.