Strip(3pm)
π NAME π
Chart::Strip β draw strip chart type graphs π¦β¨
πΈ SYNOPSIS πΈ
use Chart::Strip;
my $ch = Chart::Strip->new(
title => 'Happiness of our Group',
# other options ...
);
$ch->add_data( $davey_data, { style => 'line',
color => 'FF0000',
label => 'Davey' } );
$ch->add_data( $jenna_data, { style => 'line',
color => '00FF88',
label => 'Jenna' } );
print $ch->png();
π DESCRIPTION π
okay so bestie, Chart::Strip plots your data values versus time β it's giving seismograph, EKG, network usage report realness. π«Ά
It can plot multiple data sets on one graph. It offers several styles of plots. And it automatically figures out the proper ranges and labels for both axii. no cap, it just does it. π
β¨ USAGE β¨
π Create the Chart π
$chart = Chart::Strip->new();
$chart = Chart::Strip->new(
option1 => value,
option2 => value,
);
If you specify no options at all, sensible default values will be used. periodt. π
The following options are recognized:
"width"β The width of the image"height"β The height of the image."title"β The title of the graph. Will be placed centered at the top."x_label"β The label for the x axis. Will be placed centered at the bottom."y_label"β The label for the y axis. Will be placed vertically along the left side."draw_grid"β Should a grid be drawn on the graph?"draw_border"β Should a border be drawn around the edge of the image?"draw_tic_labels"β Should value labels be shown?"draw_data_labels"β Should each data set be labeled?"transparent"β Should the background be transparent?"grid_on_top"β Should the grid be drawn over the data (1) or below the data (0)?"binary"β Use powers of 2 instead of powers of 10 for the y axis labels."data_label_style"β Style for drawing the graph labels."text"or"box""thickness"β Thickness of lines in pixels. (Requires GD newer than$VERSION)."skip_undefined"β Don't draw a line into or out of a datapoint whose value is undefined. If false, undefined values are treated as though they were 0."boxwidth"β Width of boxes for box style graphs. The width may also be specified as"width"in the data options or per point. If no width is specified a reasonable default is used.
π Adding Data π
$chart->add_data( $data, $options );
The data should be an array ref of data points. Each data point should be a hash ref containing:
{
time => $time_t, # must be a unix time_t
value => $value, # the data value
color => $color, # optional, used for this one point
}
or, range style graphs should contain:
{
time => $time_t, # must be a unix time_t
min => $low, # the minimum data value
max => $high, # the maximum data value
color => $color, # optional, used for this one point
}
and the options may contain:
{
style => 'line', # graph style: line, filled, range, points, box
color => 'FF00FF', # color used for the graph
label => 'New England', # name of the data set
}
points style graphs may specify the point diameter, as "diam" π
box style graphs may specify the box width, as "width" π
line and filled graphs may specify a "smooth" parameter, to connect points using smooth curves instead of straight lines. A value of 1 is recommended, larger values will be less smooth. (yes bestie, larger = less smooth, it's giving backwards but it's true π)
line, points, box, and filled graphs may specify a drop shadow, consisting of a hashref containing "dx", "dy", "dw", and optionally, "color" π¦
shadow => { dx => 3, dy => 3, dw => 3, color => 'CCCCCC' }
π¦ Outputing The Image π¦
$chart->png()β Will return the PNG image$chart->jpeg()β Will return the jpeg image$chart->gd()β Will return the underlying GD object.
π EXAMPLE IMAGES π
http://argus.tcp4me.com/shots.html
http://search.cpan.org/src/JAW/Chart-Strip-1.07/eg/index.html
π LICENSE π
This software may be copied and distributed under the terms found in the Perl "Artistic License".
A copy of the "Artistic License" may be found in the standard Perl distribution.
π BUGS π
There are no known bugs in the module. β¨ iconic behavior honestly.
πΈ SEE ALSO πΈ
Yellowstone National Park.
π«Ά AUTHOR π«Ά
Jeff Weisberg - http://www.tcp4me.com
and that's the whole page bestie π this lil doc came from the User Contributed Perl Documentation corner of the Strip(3pm) manual, running on perl v5.36.0 and dated 2023-01-22 β go plot something gorgeous, ily, bye πβ¨
π¦ where this page comes from
- debian bookworm: libchart-strip-perl 1.08-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libchart-strip-perl 1.08-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libchart-strip-perl 1.08-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libchart-strip-perl 1.08-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libchart-strip-perl 1.08-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms