persistence for nostream

Ignore-this: 8d8ed631ca050aa138ec640db05a84ef

darcs-hash:20090827202308-0cb85-76575e918f2b3d47023c155ee2b2dea89d1526de.gz
This commit is contained in:
Dima Kogan 2009-08-27 13:23:08 -07:00
parent ff04048382
commit d7fd9db356

View File

@ -113,7 +113,10 @@ sub plotThread
sub mainThread {
local *PIPE;
open PIPE, "|gnuplot --persist" || die "Can't initialize gnuplot\n";
my $dopersist = "";
$dopersist = "--persist" if(!$options{"stream"});
open PIPE, "|gnuplot $dopersist" || die "Can't initialize gnuplot\n";
autoflush PIPE 1;
my $temphardcopyfile;
@ -237,6 +240,11 @@ sub mainThread {
printf "Wrote output to $outputfile\n";
return;
}
# we persist gnuplot, so we shouldn't need this sleep. However, once
# gnuplot exist, but the persistent window sticks around, you can no
# longer interactively zoom the plot. So we still sleep
sleep(100000);
}
}