SVG::Graph::Kit - Simplified SVG data plotting
version 0.0403
use SVG::Graph::Kit; my $data = [ [ 1, 2, 0 ], [ 2, 3, 1 ], [ 3, 5, 1 ], [ 4, 7, 2 ], [ 5, 11, 3 ], [ 6, 13, 5 ], ]; my $g = SVG::Graph::Kit->new(data => $data); print $g->draw; # > plot.svg
An SVG::Graph::Kit object is an automated data plotter that is a subclass of SVG::Graph (which unfortunately rotates the x-axis tick labels 90 degrees).
SVG::Graph::Kit
SVG::Graph::Kit - Data plotting with SVG
$g = SVG::Graph::Kit->new(data => \@LoL); $g = SVG::Graph::Kit->new(data => \@LoL, axis => 0); $g = SVG::Graph::Kit->new( data => \@LoL, axis => { xticks => 10, yticks => 20 }, ); $g = SVG::Graph::Kit->new( width => 300, height => 300, margin => 20, data => \@LoL, plot => { type => 'line', # default: scatter 'fill-opacity' => 0.5, # etc. }, axis => { 'stroke-width' => 2, # etc. ticks => scalar @$LoL, }, );
Return a new SVG::Graph::Kit instance.
Arguments:
data => Numeric vectors (the datapoints) plot => Chart type and data rendering properties axis => Axis rendering properties or 0 for off
axis => 0 turns off the rendering of the axis.
axis => 0
Log scaling.
Position axis origin.
Call any Statistics::Descriptive method, not just those given by SVG::Graph.
Statistics::Descriptive
SVG::Graph
Highlight data points or areas.
Draw grid lines.
Plot polar axes for polar plots.
The t/* tests.
Gene Boggs <gene@cpan.org>
This software is copyright (c) 2022 by Gene Boggs.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install SVG::Graph::Kit, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SVG::Graph::Kit
CPAN shell
perl -MCPAN -e shell install SVG::Graph::Kit
For more information on module installation, please visit the detailed CPAN module installation guide.