|
From: Thomas S. <t.s...@fz...> - 2011-08-16 15:24:01
|
Saurabh T <saurabh <at> hotmail.com> writes: > > I have a simple n-column data file, but instead of plotting ($1):($2) etc, I want to plot ($1):($2/x) where x > is the data point in the first row of column 2. Similarly for $3, $4 and so on - in different plots. Thus > basically I want to be able to scale column data by the first item in the column. (I do understand and expect > that the first data point will always show up as 1 in the plot). > > Is this possible with gnuplot or do I have to preprocess my data file to achieve this? > > Thank you. store the 1st value in the column into the variable 'x' when reading the 1st row ('$0==0'): plot 'datafilename' using 1:($0==0?x=$2:0 , $2/x) |