File: newick_tree.pl

package info (click to toggle)
libsvg-graph-perl 0.02-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 616 kB
  • sloc: perl: 2,793; makefile: 2
file content (19 lines) | stat: -rwxr-xr-x 446 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

use strict;
use Data::Dumper;
use SVG::Graph;
use SVG::Graph::Data;
use SVG::Graph::Data::Tree;

my $graph = SVG::Graph->new(width=>1600,height=>1000,margin=>30);

my $group0 = $graph->add_group;

my $tree = SVG::Graph::Data::Tree->new;

$tree->read_file('-file'=>'euk.newick','-format'=>'newick');
$group0->add_data($tree);

$group0->add_glyph('tree', stroke=>'black','stroke-width'=>2,'font-size'=>'10px');
print $graph->draw;