|
From: Andres C. <aci...@gm...> - 2014-05-11 06:32:42
|
Hi,
I'm trying to create a fence plot with several non-normalized data
files. First I need to make them uniform by normalizing to the maximum
value in each dataset, using the stats command.
When plotting I need to call upon the maximum for each dataset to
normalize the column I'm trying to plot, but I just can't figure out
how to do it properly.
The minimal script below fails only in the normalization with:
warning: maxval is not a string variable
files = "file1 file2 file3"
laser_sb = 172.0
col = 3
unset key
set style data impulses
do for [i = 1 : words(files)] {
stats (word(files, i) . '.csv') using col name 'file'.i
}
set macros
maxval(n) = 'file'.n.'_max'
splot for [i = 1 : words(files)] word(files, i).'.csv' \
using ($1 - laser_sb):(i):(column(col) / (@maxval(i))) w l
|