Prova con:
system("gnuplot -p comando.dat");
oppure con:
system("gnuplot comando.dat -");
se vuoi anche il prompt. Ciao.