12
votes

I am running a simple script, that reads data from a file and plots it. My problem is that I reread and replot the data, as the file continuously changes. Whenever I use refresh the plot window becomes active again, which I would like to prevent. I would like the plot to be updated in the background. Is this possible?

My sample script:

#!/usr/bin/gnuplot
set datafile separator ","
plot "data.dat" using 1:3
pause 1; refresh; reread;
1
For anybody trying to use this technique: The 'refresh' command was invalid when I tried it. It worked when I replaced it with 'replot'HXCaine

1 Answers

13
votes

This depends on what terminal you're using. wxt, x11 and qt support a noraise option:

set term x11 1 noraise

This should allow it to stay in the background.