gnuplot: load datafile 1:1 into datablock

It is possible to read a file into a datablock, provided you know the input data format. For example, you have a file MyFile1 with numbers in 3 columns which you want to read into datablock MyBlock1, then plot in 3 ways:

set table $MyBlock1
   plot "MyFile1" using 1:2:3 with table
unset table
plot $MyBlock1 using 1:2 with points
plot $MyBlock1 using 2:3 with points
plot $MyBlock1 using 1:3 with lines

This avoids reading the file several times, and should presumably work on any platform. Rather than doing this, I imagine it would be simpler to just copy your files from your slow filesystem to a local filesystem.

Leave a Comment