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

View File

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