1
votes

I am a newbie with gnuplot. I am unable to figure out how lines can be drawn between points.

In the image below all the red points are represented as follows ($TMPFILE1.sent.var) :

1371096185.986000 1000 (x,y) -- p1
1371096186.331000 1000 (x,y)
1371096187.158000 2000  ------ p3
1371096187.503000 2000

I am not sure how to draw lines between the points P1 and P3. Since I will have many such points they would all be present in a temp file. I have looked at some of the existing examples which have not solved my problem. The plot below is generated using

 TMPFILE1=/home/git/Timing.tmp
 gnuplot -p -e "set size square;set yrange [0:4000];set xtics nomirror rotate by -45;set grid;plot \"$TMPFILE1.sent.var\" title 'Tx' , \"$TMPFILE1.rcv.var\"title 'Rx'"

image

1

1 Answers

2
votes

To connect every other point

plot "Timing.tmp" title 'Tx', \
     "" every 2 w l title ""

To draw a line between the first and third points

plot "Timing.tmp" title 'Tx', \
     "" every 2::::2 w l title ""