|< 1 2 >| | 13 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;
use GraphViz;
use CGI;
my $q = new CGI();
print $q->header(), $q->start_html();
my $g = GraphViz->new(layout => 'dot',
rankdir => 0,
node => { height => '0.05', shape => 'box', URL => '\N' } );
$g->add_edge('A' => 'B');
$g->add_edge('A' => 'C');
# hier startet graphviz dot.exe
print $q->p($_) for (split /\n/, $g->as_ismap);
print $q->end_html;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;
use GraphViz;
use CGI;
my $q = new CGI();
print $q->header(), $q->start_html();
open my $dot, ">", "tree.dot" || die $!;
print $dot qq(digraph g { graph [] A -> B; C -> B; });
close $dot;
my $cmd = "dot -Tgif tree.dot -o tree.gif";
system($cmd);
print $q->end_html;
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use warnings;
# use GraphViz;
use CGI;
use IPC::Run qw(run binary);
my $q = new CGI();
print $q->header(), $q->start_html();
my $dot = qq(digraph g { graph [] A -> B; C -> B; });
run ['dot', '-Tgif'], \$dot, '>', binary(), 'test_tree.gif';
print $q->end_html;
1
2
3
4
5
6
use strict;
use warnings;
use IPC::Run qw(run binary);
my $dot = qq(digraph g { graph [] A -> B; C -> B; });
run ['dot', '-Tgif'], \$dot, '>', binary(), 'test_tree.gif';
|< 1 2 >| | 13 Einträge, 2 Seiten |