Add --legend-position to tsplot

This commit is contained in:
Peter J. Holzer 2020-02-16 10:51:30 +01:00
parent cdd9f6fdd8
commit b574ed25cc
1 changed files with 3 additions and 0 deletions

3
tsplot
View File

@ -57,6 +57,7 @@ my $stacked = 0;
my @yrange; my @yrange;
my $keeptempfiles; my $keeptempfiles;
my $finalresolution; my $finalresolution;
my $legend_position = 'top right';
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,
@ -67,6 +68,7 @@ GetOptions('output_format|output-format=s' => \$output_format,
'yrange=s{2}' => \@yrange, 'yrange=s{2}' => \@yrange,
'keeptempfiles' => \$keeptempfiles, 'keeptempfiles' => \$keeptempfiles,
'finalresolution=i' => \$finalresolution, 'finalresolution=i' => \$finalresolution,
'legend-position=s' => \$legend_position,
) )
or pod2usage(verbose => 0); or pod2usage(verbose => 0);
@ -76,6 +78,7 @@ binmode STDOUT, ':raw';
my $ts = TimeSeries->new(output_format => $output_format); my $ts = TimeSeries->new(output_format => $output_format);
$ts->{keeptempfiles} = 1 if $keeptempfiles; $ts->{keeptempfiles} = 1 if $keeptempfiles;
$ts->legend_position($legend_position);
while (<>) { while (<>) {
chomp; chomp;
my @legend = split($sep); my @legend = split($sep);