In gnuplot, how to label each point in the plot with its coordinates? -
i have data file, abc.dat , want plot labeling each coordinate (1,5), (4,6), (2,8) , on ....
abc.dat
:
1 5 4 6 2 8 4 5 7 8 8 9 3 4
use labels
plotting style this. requires 3 using
specifiers: x-value, y-value , string placed @ given coordinates. easiest command be:
plot 'abc.dat' using 1:2:(sprintf("(%d, %d)", $1, $2)) labels notitle
that places respective labels centered @ coordinates.
the following command plots point @ respective coordinate , places coordinate label bit shifted near it:
set offset 1,1,1,1 plot 'abc.dat' using 1:2:(sprintf("(%d, %d)", $1, $2)) labels point pt 7 offset char 1,1 notitle
the result 4.6.4 is:
Comments
Post a Comment