I'm using bash to feed gnuplot from a script. How you pop up only one window? Let say you run
#!/bin/bash
for((i=1;i<6;i++)) do
echo "plot sin(x)"
done | gnuplot -persist
you will get 5 windows of the same plot. Is there an option to get only one?
There was a mistake above. That wasn't exactly the kind of run-time i'm doing. Is more like runing the next script, say, 5 times
#!/bin/bash
echo "plot sin(x)"
I just realized that what I want to do is kill the latest gnuplot process before make the new one.
Sorry for that. I'm sooo tired today :D
killall gnuplot_x11
if you're using the x11 terminal. I'm not sure if -persist works with other terminals...(tested on OS X) - mgilson