Reputation: 823
Normally, when plotting using lines, gnuplot connects points defined by subsequent rows of a datafile. However, my datafile is of the form
x1 y1 x2 y2
x1 y1 x2 y2
x1 y1 x2 y2
...
and I want to connect every two points (x1,y1) and (x2,y2) of one row of the datafile by a line. I.e., the result should be n lines, each comprising two points, where n is the number of lines in the file.
Question: Is this (easily) achievable using gnuplot?
Attempt: I now that that this isn't the way gnuplot normally deals with datafiles. Of course, I can somehow transpose my datafile using awk or something like that. However, I would hope that there is an easier approach.
Upvotes: 1
Views: 134