I am trying to plot some data with gnuplot. I want to use a static script.gp file and feed it from stdin with my data. I also have multiple datasets that I need to pass to the script.
script.gp:
set term jpeg
set encoding utf8
plot '<cat' index 0 with lines, plot '' index 1 with lines
data:
1 2
2 2
0 0
7 4
command:
cat data | gnuplot script.gp
This doesn't work, since I'm guessing it tries to reread from stdin. Is there a way I can do this, or do I have to use temporary files to store my data?
plot '< for i in {1..50}; do echo "$RANDOM"; done' w lmaybehelp specialcan give some hint for your case