Templat...lines3d(3)
π Template::Plugin::GD::Graph::lines3d
okay so bestie, this page is from the User Contributed Perl Documentation and it's literally the manual for Template::Plugin::GD::Graph::lines3d, which lives in section 3 of the manual (3 = library calls, iykyk).
β¨ NAME β¨
Template::Plugin::GD::Graph::lines3d β Create 3D line graphs with axes and legends π
Like, actual three-dimensional-looking line graphs. With axes. With legends. The whole thing. Obsessed.
πΈ SYNOPSIS πΈ
[% USE g = GD.Graph.lines3d(x_size, y_size); %]
That's it, that's the vibe. You USE it, you give it an x_size and a y_size, and a graph object shows up in your template like it was always meant to be there. β¨
π¦ EXAMPLES π¦
okay this is the part where it gets good, look at this whole situation:
[% FILTER null;
data = [
["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec", ],
[-5, -4, -3, -3, -1, 0, 2, 1, 3, 4, 6, 7],
[4, 3, 5, 6, 3,1.5, -1, -3, -4, -6, -7, -8],
[1, 2, 2, 3, 4, 3, 1, -1, 0, 2, 3, 2],
];
USE my_graph = GD.Graph.lines3d();
my_graph.set(
x_label => 'Month',
y_label => 'Measure of success',
title => 'A 3d Line Graph',
y_max_value => 8,
y_min_value => -8,
y_tick_number => 16,
y_label_skip => 2,
box_axis => 0,
line_width => 3,
zero_axis_only => 1,
x_label_position => 1,
y_label_position => 1,
x_label_skip => 3,
x_tick_offset => 2,
transparent => 0,
);
my_graph.set_legend("Us", "Them", "Others");
my_graph.plot(data).png | stdout(1);
END;
-%]
So what's happening here, fr fr:
- the
dataarray is your classic first-row-is-labels setup β all twelve months"Jan"through"Dec"π - then three more rows of actual numbers, because those are your three data sets (hi "Us", "Them", and "Others" π)
my_graph.set(...)is where you customise literally everything β labels, title, axis ranges, tick counts, all of itmy_graph.set_legend("Us", "Them", "Others")names your three lines πmy_graph.plot(data).png | stdout(1)renders it and pipes the PNG straight out to stdout, and yeah,stdoutis spelled that way- and the whole thing is wrapped in
[% FILTER null; ... END; -%]so the template doesn't leak any stray whitespace into your beautiful image output β¨
no cap, that zero_axis_only => 1 and box_axis => 0 combo is a look.
π DESCRIPTION π
The GD.Graph.lines3d plugin provides an interface to the GD::Graph::lines3d class defined by the GD::Graph3d module. π«Ά
It lets you plot one or more (x,y) data sets as y-versus-x lines, and the lines have a 3-dimensional appearance, and there are axes and legends along for the ride. It's giving main character graph energy, honestly.
See GD::Graph3d for more details. That's where the real lore lives. π
π AUTHOR π
Real ones built this, let's give credit where it's due:
- 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.
collab of the century, honestly π
π COPYRIGHT π
Copyright (C) 2001 Craig Barratt <craig@arraycomm.com>, 2006 Andy Wardley <abw@cpan.org>.
GD::Graph3d is copyright (C) 1999,2000 Wadsack-Allen. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π«Ά
π₯ SEE ALSO π₯
the whole friend group, lineup below:
Template::Plugin::GDTemplate::Plugin::GD::Graph::linesTemplate::Plugin::GD::Graph::barsTemplate::Plugin::GD::Graph::bars3dTemplate::Plugin::GD::Graph::pointsTemplate::Plugin::GD::Graph::linespointsTemplate::Plugin::GD::Graph::areaTemplate::Plugin::GD::Graph::mixedTemplate::Plugin::GD::Graph::pieTemplate::Plugin::GD::Graph::pie3dGD
go read them all, i'm literally begging π§
okay that's the whole page! this one's running on perl v5.42.0, dated 2017-10-08, and the source is the User Contributed Perl Documentation β so like, a real human contributed this and we're all just vibing on their work. bye bestie, happy graphing πβ¨π
π¦ 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