Plotting lines with gnuplot python
Question: I have a list:

    
    
    x = [1,2,3,4]
    

Now using gnuplot, I have plotted the points as `(0,1), (1,2), ...`

Here is the syntax I used:

    
    
    g = Gnuplot.Gnuplot()
    g.plot(x)
    

Now I have my required set of points but I want to join these points by a
line. How do I do that?


Answer: Does the following work for you?

    
    
    >>> import Gnuplot
    >>> x = [1,2,3,4]
    >>> gp = Gnuplot.Gnuplot()
    >>> gp.title('My title')
    >>> gp('set style data linespoints')
    >>> gp.plot(x)
    

You can pass whatever options you want in the 5th command.

