File: synopsis_xy.pl

package info (click to toggle)
libsvg-tt-graph-perl 1.04-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 488 kB
  • sloc: perl: 5,717; makefile: 7
file content (23 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use lib qw(lib);
use SVG::TT::Graph::XY;

my @data_cpu  = (0.3, 23, 0.5, 54, 1.0, 67, 1.8, 12);
my @data_disk = (0.45, 12, 0.51, 26, 0.53, 23);
  
my $graph = SVG::TT::Graph::XY->new({
  'height' => '500',
  'width'  => '300',
});
  
$graph->add_data({
  'data'  => \@data_cpu,
  'title' => 'CPU',
});

$graph->add_data({
  'data'  => \@data_disk,
  'title' => 'Disk',
});

#print "Content-type: image/svg+xml\n\n";
print $graph->burn();