diff --git a/TimeSeries.pm b/TimeSeries.pm index 3cded4b..9311873 100644 --- a/TimeSeries.pm +++ b/TimeSeries.pm @@ -33,7 +33,7 @@ use HTTP::Date qw(parse_date); use Time::Local qw(timegm_nocheck); use POSIX qw(strftime); -our $VERSION = do { my @r=(q$Revision: 1.19 $=~/\d+/g);sprintf "%d."."%02d"x$#r,@r}; +our $VERSION = do { my @r=(q$Revision: 1.20 $=~/\d+/g);sprintf "%d."."%02d"x$#r,@r}; our $debug; @@ -324,7 +324,7 @@ sub plot { my ($self) = @_; #print Dumper($self); - my ($datafh, $datafn) = tempfile("tsplotXXXXXXXX", UNLINK => 1); + my ($datafh, $datafn) = tempfile("tsplotXXXXXXXX", UNLINK => !$self->{keeptempfiles}); for my $i (@{$self->{data}}) { my $time = $i->[0]; my $data = $i->[1]; @@ -345,12 +345,12 @@ sub plot { } close($datafh); - my ($ctlfh, $ctlfn) = tempfile(UNLINK => 1); - my ($psfh, $psfn) = tempfile(UNLINK => 1); + my ($ctlfh, $ctlfn) = tempfile(UNLINK => !$self->{keeptempfiles}); + my ($psfh, $psfn) = tempfile(UNLINK => !$self->{keeptempfiles}); # generic settings - print $ctlfh "set term postscript color\n"; + print $ctlfh "set term postscript color solid 10\n"; print $ctlfh "set output '$psfn'\n"; print $ctlfh "set data style $self->{style}\n"; print $ctlfh "set grid\n";