4

I have a file with numbers:

1
4
9
...

I want to plot a depencency of the numbers from their order position in the file (points [(1,1); (2;4); (3; 9); ...]).

How can I do it with gnuplot?

1 Answer 1

6

Try this :

plot "filename.txt" using ($0+1):1

$0 is the index of entries but it starts at 0 so we simlpy add 1 to it.

Tell me if this works for you!

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.