diff --git a/tsplotv b/tsplotv index a7e1a68..25803c3 100755 --- a/tsplotv +++ b/tsplotv @@ -48,6 +48,7 @@ my $stacked = 0; my $style = "lines"; my $log_y =0; my $finalresolution; +my $time_t =0; GetOptions('help|?' => \$help, 'legend_position|legend-position=s' => \$legend_position, @@ -56,6 +57,7 @@ GetOptions('help|?' => \$help, 'style:s' => \$style, 'log_y|log-y' => \$log_y, 'finalresolution' => \$finalresolution, + 'time_t' => \$time_t, ) or pod2usage(2); pod2usage(1) if $help; @@ -84,7 +86,11 @@ $ts->finalresolution($finalresolution) if $finalresolution; for my $timestamp (sort keys %data) { my %d = %{$data{$timestamp}}; my @values = @d{@series}; - $ts->add_timestring($timestamp, @values); + if ($time_t) { + $ts->add($timestamp, @values); + } else { + $ts->add_timestring($timestamp, @values); + } } my $g = $ts->plot();