Added (undocumented) option keeptempfiles.

Changed postscript output: Lines are now solid, font size is 10pt.
This commit is contained in:
hjp 2007-02-17 12:28:48 +00:00
parent fd488facbf
commit 429e13239e
1 changed files with 5 additions and 5 deletions

View File

@ -33,7 +33,7 @@ use HTTP::Date qw(parse_date);
use Time::Local qw(timegm_nocheck); use Time::Local qw(timegm_nocheck);
use POSIX qw(strftime); 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; our $debug;
@ -324,7 +324,7 @@ sub plot {
my ($self) = @_; my ($self) = @_;
#print Dumper($self); #print Dumper($self);
my ($datafh, $datafn) = tempfile("tsplotXXXXXXXX", UNLINK => 1); my ($datafh, $datafn) = tempfile("tsplotXXXXXXXX", UNLINK => !$self->{keeptempfiles});
for my $i (@{$self->{data}}) { for my $i (@{$self->{data}}) {
my $time = $i->[0]; my $time = $i->[0];
my $data = $i->[1]; my $data = $i->[1];
@ -345,12 +345,12 @@ sub plot {
} }
close($datafh); close($datafh);
my ($ctlfh, $ctlfn) = tempfile(UNLINK => 1); my ($ctlfh, $ctlfn) = tempfile(UNLINK => !$self->{keeptempfiles});
my ($psfh, $psfn) = tempfile(UNLINK => 1); my ($psfh, $psfn) = tempfile(UNLINK => !$self->{keeptempfiles});
# generic settings # 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 output '$psfn'\n";
print $ctlfh "set data style $self->{style}\n"; print $ctlfh "set data style $self->{style}\n";
print $ctlfh "set grid\n"; print $ctlfh "set grid\n";