GraphViz2
view release on metacpan or search on metacpan
t/gen.macro.1.t view on Meta::CPAN
$graph->add_node(name => $node_1, shape => 'hexagon');
$graph->add_node(name => $node_2, color => 'orange');
$graph->add_edge(from => $node_1, to => $node_2);
$graph->pop_subgraph;
}
my $id = '1';
my $graph = GraphViz2->new(
edge => {color => 'grey'},
global => {directed => 1},
graph => {label => "Macro demo $id - Non-cluster sub-graphs", rankdir => 'TB'},
);
macro($graph, 'One', 'Chadstone', 'Waverley');
macro($graph, 'Two', 'Hughesdale', 'Notting Hill');
if (@ARGV) {
my($format) = shift || 'svg';
my($output_file) = shift || File::Spec -> catfile('html', "macro.$id.$format");
$graph -> run(format => $format, output_file => $output_file);
} else {
t/gen.macro.2.t view on Meta::CPAN
$graph->add_node(name => $node_1, shape => 'hexagon');
$graph->add_node(name => $node_2, color => 'orange');
$graph->add_edge(from => $node_1, to => $node_2);
$graph->pop_subgraph;
}
my $id = '2';
my $graph = GraphViz2->new(
edge => {color => 'grey'},
global => {directed => 1},
graph => {label => "Macro demo $id - Linked non-cluster sub-graphs", rankdir => 'TB'},
node => {shape => 'oval'},
);
macro($graph, 'One', 'Chadstone', 'Waverley');
macro($graph, 'Two', 'Hughesdale', 'Notting Hill');
$graph->add_edge(from => 'Chadstone', to => 'Notting Hill', minlen => 2);
if (@ARGV) {
my($format) = shift || 'svg';
t/gen.macro.3.t view on Meta::CPAN
$graph->add_node(name => $node_1, shape => 'hexagon');
$graph->add_node(name => $node_2, color => 'orange');
$graph->add_edge(from => $node_1, to => $node_2);
$graph->pop_subgraph;
}
my $id = '3';
my $graph = GraphViz2->new(
edge => {color => 'grey'},
global => {directed => 1},
graph => {label => "Macro demo $id - Cluster sub-graphs", rankdir => 'TB'},
);
macro($graph, 'cluster 1', 'Chadstone', 'Waverley');
macro($graph, 'cluster 2', 'Hughesdale', 'Notting Hill');
if (@ARGV) {
my($format) = shift || 'svg';
my($output_file) = shift || File::Spec -> catfile('html', "macro.$id.$format");
$graph -> run(format => $format, output_file => $output_file);
} else {
t/gen.macro.4.t view on Meta::CPAN
$graph->add_node(name => $node_1, shape => 'hexagon');
$graph->add_node(name => $node_2, color => 'orange');
$graph->add_edge(from => $node_1, to => $node_2);
$graph->pop_subgraph;
}
my $id = '4';
my $graph = GraphViz2->new(
edge => {color => 'grey'},
global => {directed => 1},
graph => {label => "Macro demo $id - Linked cluster sub-graphs", rankdir => 'TB'},
);
macro($graph, 'cluster 1', 'Chadstone', 'Waverley');
macro($graph, 'cluster 2', 'Hughesdale', 'Notting Hill');
$graph -> add_edge(from => 'Chadstone', to => 'Notting Hill', minlen => 2);
if (@ARGV) {
my($format) = shift || 'svg';
my($output_file) = shift || File::Spec -> catfile('html', "macro.$id.$format");
t/gen.macro.5.t view on Meta::CPAN
$graph->add_edge(from => $node_1, to => $node_2);
$graph->pop_subgraph;
}
my $id = '5';
my $graph = GraphViz2->new(
edge => {color => 'grey'},
global => {directed => 1},
graph => {
compound => 'true',
label => "Macro demo $id - Compound cluster sub-graphs",
rankdir => 'TB',
},
);
macro($graph, 'cluster 1', 'Chadstone', 'Waverley');
macro($graph, 'cluster 2', 'Hughesdale', 'Notting Hill');
$graph->add_edge(
from => 'Chadstone',
to => 'Notting Hill',
t/snapshots/gen_macro_1_t/dot_file view on Meta::CPAN
'digraph Perl {
graph [ label="Macro demo 1 - Non-cluster sub-graphs" rankdir="TB" ]
edge [ color="grey" ]
subgraph "One" {
graph [ label="One" ]
node [ color="magenta" shape="diamond" ]
"Chadstone" [ shape="hexagon" ]
"Waverley" [ color="orange" ]
"Chadstone" -> "Waverley"
}
t/snapshots/gen_macro_2_t/dot_file view on Meta::CPAN
'digraph Perl {
graph [ label="Macro demo 2 - Linked non-cluster sub-graphs" rankdir="TB" ]
node [ shape="oval" ]
edge [ color="grey" ]
subgraph "One" {
graph [ label="One" ]
node [ color="magenta" shape="diamond" ]
"Chadstone" [ shape="hexagon" ]
"Waverley" [ color="orange" ]
"Chadstone" -> "Waverley"
}
t/snapshots/gen_macro_3_t/dot_file view on Meta::CPAN
'digraph Perl {
graph [ label="Macro demo 3 - Cluster sub-graphs" rankdir="TB" ]
edge [ color="grey" ]
subgraph "cluster 1" {
graph [ label="cluster 1" ]
node [ color="magenta" shape="diamond" ]
"Chadstone" [ shape="hexagon" ]
"Waverley" [ color="orange" ]
"Chadstone" -> "Waverley"
}
t/snapshots/gen_macro_4_t/dot_file view on Meta::CPAN
'digraph Perl {
graph [ label="Macro demo 4 - Linked cluster sub-graphs" rankdir="TB" ]
edge [ color="grey" ]
subgraph "cluster 1" {
graph [ label="cluster 1" ]
node [ color="magenta" shape="diamond" ]
"Chadstone" [ shape="hexagon" ]
"Waverley" [ color="orange" ]
"Chadstone" -> "Waverley"
}
t/snapshots/gen_macro_5_t/dot_file view on Meta::CPAN
'digraph Perl {
graph [ compound="true" label="Macro demo 5 - Compound cluster sub-graphs" rankdir="TB" ]
edge [ color="grey" ]
subgraph "cluster 1" {
graph [ label="cluster 1" ]
node [ color="magenta" shape="diamond" ]
"Chadstone" [ shape="hexagon" ]
"Waverley" [ color="orange" ]
"Chadstone" -> "Waverley"
}
( run in 0.805 second using v1.01-cache-2.11-cpan-49f99fa48dc )