1
votes

I want to make a plot on the fly with data from a program called "test" using gnuplot. The output of test looks like:

0  1
1  3
2  5
...

I would like to do something like ./test | gnuplot" but I think something is missing in this command as gnuplot says: line 0: invalid command.

any comment is appreciated, thanks.

2

2 Answers

3
votes

You can call your command directly from within gnuplot like with

plot '< ./test'

Alternatively, something like

./test | gnuplot -persist -e "plot '-'" 

might also work.

0
votes

Try a temporary file:

./test > temp ; gnuplot -e "plot 'temp'; pause 5" ; rm temp