Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arrow points are located on the file on gnuplot

Tags:

gnuplot

I know by this command I can create one arrow on gnuplot.

set arrow from 0,0 to 1,1

But the problem is this which I want to create a set of arrows. which located on file.data. the x1, y1, x2 and y2 are not in the data file I just out them to show them better

x1  y1   x2   y2 

80 42.34 75 50.34
75 50.34 65 50.34
65 50.34 60 58.34
60 58.34 65 66.34
65 66.34 60 75

ius there any way to pass this file to gnuplot. in order to create an arrow from (x1,y1) to (x2,y2)

like image 437
alex Avatar asked Aug 10 '14 18:08

alex


1 Answers

You can plot with the with vectors style. With your data file, this would be:

plot "data" using 1:2:($3-$1):($4-$2) with vectors
like image 96
Miguel Avatar answered Oct 28 '22 20:10

Miguel