Bio::Phylo tree drawer text
0
0
Entering edit mode
8.6 years ago
shirani.s ▴ 10

I am using a perl script to draw a Newick format tree using Bio::Phylo::Treedrawer. Here's the related part of the code:

    $newickString .= ';';

my $forest = Bio::Phylo::IO->parse(
-format => 'newick',
-string => $newickString
);

my $tree = $forest->first;
my $treedrawer = Bio::Phylo::Treedrawer->new(
-width  => 3000,
-height => 1580,
-shape  => 'CURVY',   #curvogram
-mode   => 'PHYLO',   #phylogram
-format => 'svg',
-text_width => 500,
);
$treedrawer -> set_scale_options(
-width => '100%',
-major => '10%',     #major cross hatch interval
-minor => '2%',      #minor cross hatch interval
-label => 'MYA',
);
$treedrawer -> set_text_horiz_offset(5);
$treedrawer -> set_text_width(500);
$treedrawer -> set_tree($tree);
print SVG $treedrawer -> draw;

I would like to format the text size but no matter what number I put as -text_width it doesn't change and I still get the same output. What is the problem? Am I using an incorrect argument?

tree bio::phylo • 1.7k views
ADD COMMENT
1
Entering edit mode

May be text width is not the same as font size. I guess there is no font option in Bio::Phylo::Treedrawer

ADD REPLY

Login before adding your answer.

Traffic: 2116 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6