I'm trying to plot an arbitrary number of lines in a same plot. My data file is like the following:
1 10 15 20
2 20 25 30
3 30 35 40
4 40 45 50
5 50 55 60
I'm using multiplot to do this:
set multiplot
do for [i=1:ny] {
plot 'data.dat' u 1:i+1 with lines lc i title word(names,i)
}
unset multiplot
where ny=3 in this example. As expected, the yrange of each plot is different, so the graph looks very messy. I'm trying to add
set yrange [ymin:ymax]
where ymin=min(col2,col3,col4,...,coln) is the minimum value among all the columns 2-n and ymax is the maximum value. However, I still don't know how to get ymin and ymax. The function stats allow me to get minimums and maximums for one or two columns at the same time, but no more. Even if I do this column by column, I still don't know how to get the maximum among n scalars.
Any idea?