From 92b79b783e44cd508c1fd8e4d971ccf33b06b324 Mon Sep 17 00:00:00 2001 From: hjp Date: Mon, 3 Sep 2012 10:15:00 +0000 Subject: [PATCH] [late commit Apr 3 2011]: Added option --finalresolution --- tsplot | 10 +++++++--- tsplotv | 7 ++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tsplot b/tsplot index 9d3b38f..df07014 100755 --- a/tsplot +++ b/tsplot @@ -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 diff --git a/tsplotv b/tsplotv index de3ed7e..a7e1a68 100755 --- a/tsplotv +++ b/tsplotv @@ -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}};