How do I read data from stdin to gnuplot and plot same data twice
问题 I have a program that generates data with a couple of input arguments and spits it out to stdout, I pipe this data to gnuplot and plot it (in my case I don't have an intermediate file): $ cat sample_data.dat | gnuplot plot_script.gp sample_data.dat: 0 0.5000 1 0.9225 2 0.2638 3 0.7166 4 0.7492 plot_script.gp #!/usr/bin/gnuplot set terminal wxt size 700,524 enhanced font 'Verdana,10' persist set style line 1 lc rgb '#0060ad' pt 7 lt 1 lw 0.5 # circle blue thin line set style line 2 lc rgb '