gnuplot syntax error when using python -


I'm just about finding out how Python and Gnuplot work together.

I got an introduction and I wanted to execute it on my Ubuntu machine. Gnuplot gp = Gnuplot.Gnuplot (persist = 1) GP ('set data style line') # data set first (a quadratic) 1 [[0, 0], [1, 1], [2, 4], # 3 Data Set (single line) data 2 = [[0, 0], [1, 1], [2, 2], [3, 3], [3, 9], [4, 4, 4]] Plot 1 = Gnuplot.PlotItems.Data (Data 1, _ = "Lines", with Title = "Quadatic") plot2 = Gnuplot.PlotItems.Data (data2, with_ =

However, I get the following error message:

   

./demo.py ./demo.py: line 2: syntax error near unexpected token `('./demo.py: line2:` gp = Gnuplot.Gnuplot (persist = 1)' '

Any ideas that might be wrong here? I have installed Python-GnomePlot to install gnuplot support for Python. Itemprop = "text">

Did you put a bangle in the first line? I.e.:

  #! / Usr / bin / python  

The interpreter is not executing the file.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -