Table of Contents


brew install gnuplot


Plot difference of 2 columns

plot '< sort -n file3' using 1:($2-$3) with lines

Loop Structure Inside Gnuplot

There sure is (in gnuplot 4.4+):

plot for [i=1:1000] 'data'.i.'.txt' using 1:2 title 'Flow '.i

The variable i can be interpreted as a variable or a string, so you could do something like

plot for [i=1:1000] 'data'.i.'.txt' using 1:($2+i) title 'Flow '.i

if you want to have lines offset from each other.

Plot Tree Structure

Useful Links