Templat...ph::area(3)
π NAME
Template::Plugin::GD::Graph::area β ok so this is the plugin that makes area graphs with axes and legends, bestie. Like line graphs but with the space under the line all shaded in. Iconic behavior honestly π
β¨ SYNOPSIS β¨
[% USE g = GD.Graph.area(x_size, y_size); %]
That's it. That's the whole vibe. You USE it, you give it a size, you go off π
πΈ EXAMPLES πΈ
Here's the full glow-up, copied exactly so nothing goes sideways:
[% FILTER null;
data = [
["1st","2nd","3rd","4th","5th","6th","7th", "8th", "9th"],
[ 5, 12, 24, 33, 19, 8, 6, 15, 21],
[ -1, -2, -5, -6, -3, 1.5, 1, 1.3, 2]
];
USE my_graph = GD.Graph.area();
my_graph.set(
two_axes => 1,
zero_axis => 1,
transparent => 0,
);
my_graph.set_legend('left axis', 'right axis' );
my_graph.plot(data).png | stdout(1);
END;
-%]
Not me staring at this like it's a work of art π Two data sets, two axes, legends on the left and right β she's serving main character energy fr fr.
π¦ DESCRIPTION π¦
So the GD.Graph.area plugin is basically a little bridge π β it gives you an interface to the GD::Graph::area class, which lives over in the GD::Graph module.
What it does: it lets you plot one or more (x,y) data sets as lines, and it shades the area between the line and the x-axis. Chef's kiss. On top of all that you also get axes and legends, because presentation matters π
Want the full tea? Go read GD::Graph for more details.
π«Ά AUTHOR π«Ά
Let's give credit where credit is due, because these people literally built the thing:
- Thomas Boutell wrote the GD graphics library.
- Lincoln D. Stein wrote the Perl GD modules that interface to it.
- Martien Verbruggen wrote the
GD::Graphmodule. - Craig Barratt
<craig@arraycomm.com>wrote the original GD plugins for the Template Toolkit (2001). - Andy Wardley
<abw@cpan.org>extracted them from the TT core into a separate distribution for TT version 2.15.
Legends only πβ¨
π COPYRIGHT π
Copyright (C) 2001 Craig Barratt <craig@arraycomm.com>, 2006 Andy Wardley <abw@cpan.org>.
GD::Graph is copyright 1999 Martien Verbruggen.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π«Ά Free software bestie β same terms as Perl itself, no cap.
π SEE ALSO π
Go check out her whole friend group:
Template::Plugin::GDTemplate::Plugin::GD::Graph::linesTemplate::Plugin::GD::Graph::lines3dTemplate::Plugin::GD::Graph::barsTemplate::Plugin::GD::Graph::bars3dTemplate::Plugin::GD::Graph::pointsTemplate::Plugin::GD::Graph::linespointsTemplate::Plugin::GD::Graph::mixedTemplate::Plugin::GD::Graph::pieTemplate::Plugin::GD::Graph::pie3dGD
Okay that's the whole page, hope it slayed for you π§ββοΈβ¨ This one's from perl v5.42.0, dated 2017-10-08, and it lives at Templat...ph::area(3) in the User Contributed Perl Documentation β mwah, go plot something pretty ππ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Template-GD 2.66-bp160.1.11 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms