I would like to know how to give a label at the end of a vector in gnuplot. I know it is possible to use \"set\" in gnuplot to show a certain label at some place, but I have hun
Imagine you have a file with the following data (which I named "temp"), where the first two coordinates are the origin and the last two coordinates are the x and y components (projections) of your vector:
0 0 1 1
0 0 1 2
0 0 1 3
0 0 1 4
0 0 1 5
Then you can do what you want with the following commands:
set xrange [0:1.2]
set yrange [0:6]
plot "temp" with vectors, "temp" u 3:4:0 with labels left
The first instance in plot
is to plot the vectors with the same convention I mentioned above in the data file, the second instance is to place a label with coordinates x = column 3 and y = column 4 (that is, at the end of your vectors), with text = column 0 (which gives the order of your data entries) and flush it to the left from those coordinates. It looks like this: