[late commit Apr 3 2011]: Added option --finalresolution

This commit is contained in:
hjp 2012-09-03 10:15:00 +00:00
parent 94091963d4
commit 92b79b783e
2 changed files with 13 additions and 4 deletions

10
tsplot
View File

@ -10,7 +10,8 @@ tsplot - plot time series in column format
=head1 SYNOPSIS
tsplotv
tsplot
[--finalresolution dpi]
[--legend-position pos]
[--output-format format ]
[--stacked]
@ -55,15 +56,17 @@ my $tsv = 0;
my $stacked = 0;
my @yrange;
my $keeptempfiles;
my $finalresolution;
GetOptions('output_format|output-format=s' => \$output_format,
'log_y|log-y' => \$log_y,
'time_t' => \$time_t,
'style:s' => \$style,
'style=s' => \$style,
'tsv' => \$tsv,
'stacked' => \$stacked,
'yrange:s{2}' => \@yrange,
'yrange=s{2}' => \@yrange,
'keeptempfiles' => \$keeptempfiles,
'finalresolution=i' => \$finalresolution,
)
or pod2usage(verbose => 0);
@ -93,6 +96,7 @@ $ts->log_y($log_y);
$ts->style($style);
$ts->stacked($stacked);
$ts->yrange(@yrange);
$ts->finalresolution($finalresolution) if $finalresolution;
my $g = $ts->plot();
print $g

View File

@ -7,11 +7,12 @@ tsplotv - plot time series given in vertical format
=head1 SYNOPSIS
tsplotv
[--finalresolution dpi]
[--legend-position pos]
[--log-y]
[--output-format format ]
[--stacked]
[--style style]
[--log-y]
[file ...]
=head1 DESCRIPTION
@ -46,12 +47,15 @@ my $output_format ='png';
my $stacked = 0;
my $style = "lines";
my $log_y =0;
my $finalresolution;
GetOptions('help|?' => \$help,
'legend_position|legend-position=s' => \$legend_position,
'output_format|output-format=s' => \$output_format,
'stacked' => \$stacked,
'style:s' => \$style,
'log_y|log-y' => \$log_y,
'finalresolution' => \$finalresolution,
) or pod2usage(2);
pod2usage(1) if $help;
@ -75,6 +79,7 @@ $ts->legend_position($legend_position);
$ts->stacked($stacked);
$ts->style($style);
$ts->log_y($log_y);
$ts->finalresolution($finalresolution) if $finalresolution;
for my $timestamp (sort keys %data) {
my %d = %{$data{$timestamp}};