You have to give gnuplot
a plotting instruction in the command line, and can use the data piping special file '-'
.
E.g.,
echo "1\n2\n4\n8\n16" | gnuplot -e "plot '-' u 0:1 w linespoints" -persist
The -persist
option allows to keep the window open. If you want to produce a PDF rather, you can use:
echo "1\n2\n4\n8\n16" | gnuplot -e "set term pdf; set output 'plot.pdf'; plot '-' u 0:1 w linespoints"