Now reading the version of gnuplot on the system, and not using --persist on versions of gnuplot too

old to support it.
This commit is contained in:
Dima Kogan 2010-01-12 21:54:49 -08:00 committed by Dima
parent 7c9c9b82be
commit 6b169e03a8

View File

@ -8,6 +8,16 @@ use Data::Dumper;
use threads;
use Thread::Queue;
open(GNUPLOT_VERSION, "gnuplot --version |");
my ($gnuplotVersion) = <GNUPLOT_VERSION> =~ /gnuplot\s*([0-9]*\.[0-9]*)/;
if(!$gnuplotVersion)
{
print STDERR "Couldn't find the version of gnuplot. Does it work? Trying anyway...\n";
$gnuplotVersion = 0;
}
close(GNUPLOT_VERSION);
my $usage = <<OEF;
Usage: $0 <options>
@ -172,7 +182,11 @@ sub plotThread
sub mainThread {
local *PIPE;
my $dopersist = "";
if($gnuplotVersion >= 4.3)
{
$dopersist = "--persist" if(!$options{"stream"});
}
if(exists $options{"dump"})
{