2

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?

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.