Сейчас такой скрипт.
#!/usr/bin/gnuplot -p
set terminal x11
set grid
N = "`tee`"
if (N == 1) {
set xlabel 'Time (Sec)'
set ylabel 'Position (Degree)'
plot 'OUT1' using 1:4 title 'Plant' with lines, \
'OUT1' using 1:9 title 'Measured' with lines, \
'OUT1' using 1:10 title 'Reference' with lines
}
if (N == 2) {
set xlabel 'Position (Degree)'
set ylabel 'Speed (Degree/Sec)'
plot 'OUT1' using 4:3 title 'Plant' with lines, \
'OUT1' using 4:8 title 'Measured' with lines
}
pause mouse close
Набирать каждый раз номер,return,^d не хорошо, помню что для таких дел было что-то более подходящее, но не помню что. Можно и через параметры было бы передать, но как не понятно.