timeseries/tsplot

21 lines
358 B
Perl
Executable File

#!/usr/bin/perl -w
use strict;
use TimeSeries;
binmode STDOUT, ':raw';
my $ts = TimeSeries->new();
while (<>) {
my @legend = split;
shift @legend; # first must be for timestamp
$ts->legend(@legend);
last;
}
while (<>) {
my ($timestamp, @values) = split();
$ts->add_timestring($timestamp, @values);
}
my $g = $ts->plot();
print $g