I have 10GB file with a couple of billions entries. It has many columns. I want to plot each column into different subplot. I used the following MWE:
set datafile separator ","
set terminal png
set output "a.png"
set multiplot layout 2,1 title ""
plot "camkii.dat" using 1:2 with lines
plot "camkii.dat" using 1:23 with lines
This script takes few tens of seconds. As you can see, I call plot "camkii.dat" ... two times. I suspect that the file is read each time. This is not very efficient and I might run out of memory.
If I could read the file into some variable (say foo) and then plot each subplot using the variable foo. Something similar to plot foo[1] ... and plot foo[2] ... etc. That way I read the file only once.
Am I right in suspecting the gnuplot might be loading the file two times. If yes, will saving the file into a variable and plotting it will help? Changes suggested to MWE would be great.
h5totxtto extract only the required data parts without reading the whole file. Just a guess, haven't benchmarked this