From 429e13239e209835e9bf0686baa2c3d24154280a Mon Sep 17 00:00:00 2001 From: hjp Date: Sat, 17 Feb 2007 12:28:48 +0000 Subject: [PATCH] Added (undocumented) option keeptempfiles. Changed postscript output: Lines are now solid, font size is 10pt. --- TimeSeries.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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";