Omar Usman
10-14-2010, 08:49 AM
Anybody used GNUPlot?
If I have some data of following format which shows 5 columns in file "test"
1 2 3 4 5
5 4 3 2 1
I can plot column 3 against 1 in gnuplot by giving:
plot "test" using 1:3
If I want to plot square of column 3 I will use:
plot "test" using 1: ($3*3) ... without the space after 1:
Now if I am to prepare shell script for this, $3 will refer to the third argument being passed to the script and not to column 3 ....
Anybody knows how to do this?
If I have some data of following format which shows 5 columns in file "test"
1 2 3 4 5
5 4 3 2 1
I can plot column 3 against 1 in gnuplot by giving:
plot "test" using 1:3
If I want to plot square of column 3 I will use:
plot "test" using 1: ($3*3) ... without the space after 1:
Now if I am to prepare shell script for this, $3 will refer to the third argument being passed to the script and not to column 3 ....
Anybody knows how to do this?