Lesson 11 of 13 · 11 min
Visualizing and Annotating Trees
Your inference run leaves you with a Newick file, tree.nwk, that stores the topology, branch lengths, and a bootstrap support value on each internal node. That file is data, not a figure, and pasting it straight into a paper communicates nothing. In this lesson you turn it into an honest, readable figure using three tools: Newick Utilities for quick command-line tidying, FigTree for interactive editing, and iTOL for annotated, publication-ready graphics.
Root on a real outgroup
A rooted tree tells the reader which direction is time and which clade is ancestral, so where you place the root changes the story completely. Choose a root that biology justifies, normally a known outgroup taxon, rather than accepting an arbitrary or midpoint root that can invent relationships that are not really supported. The nw_reroot command from Newick Utilities re-roots the tree on the branch leading to the taxa you name.
nw_reroot tree.nwk Mus_musculus > rooted.nwkLadderizing rotates each node so clades are ordered by size, giving the neat staircase readers expect. By default nw_order sorts labels alphabetically, so pass -c n to order by clade size instead; either way, like rotating a mobile, it changes only the drawing, never the topology or support. Then nw_display prints an ASCII phylogram with branches drawn proportional to their lengths, the support value beside each internal node, and a scale bar in substitutions per site (underscores in names print as spaces). Inspect that text tree first so you catch a bad root or a zero-length branch before spending time in a GUI.
nw_order -c n rooted.nwk > ordered.nwk
nw_display ordered.nwk /----------------------------+ Mus musculus
|
=+ /-------------------+ Macaca mulatta
| |
\-----------------------------------------+ 100------------+ Pongo abelii
| |
\---+ 98----+ Gorilla gorilla
| |
\-+ 95--+ Pan troglodytes
\-+ 100
\---+ Homo sapiens
|------------|------------|------------|------------|----------
0 0.2 0.4 0.6 0.8
substitutions/site
Polish in FigTree
Open ordered.nwk in FigTree; when it asks you to name the internal-node values, call the field support so those numbers are addressable. In the side panel tick Node Labels and set Display to support to print bootstrap values, then tick Scale Bar so branch lengths, which are expected substitutions per site, get a ruler. Select a clade and use the Collapse or Colour buttons to fold or highlight it, and export with File then Export PDF or File then Export SVG so nothing pixelates; skipping the scale bar is the classic pitfall, because without it a deep split and a shallow one look identical.
Annotate and export in iTOL
For richer figures, upload the same Newick to iTOL at itol.embl.de, then drag plain-text dataset files onto the tree to layer metadata: a DATASET_COLORSTRIP file paints a colored band beside each tip by group, while DATASET_STYLE recolors chosen branches. Each dataset begins with its keyword line and a DATA section of tab-separated tip-and-color rows, and the control panel lets you collapse clades interactively. When the layout is final, use the Export panel to save vector SVG, EPS, or PDF that stays crisp at journal resolution.
Try it yourself: Save this tree as tree.nwk: (Mus_musculus:0.9,(Macaca_mulatta:0.3,(Pongo_abelii:0.2,(Gorilla_gorilla:0.1,(Pan_troglodytes:0.05,Homo_sapiens:0.05)100:0.04)95:0.03)98:0.05)100:0.2); Then run nw_reroot tree.nwk Mus_musculus | nw_order -c n - > clean.nwk and view it with nw_display clean.nwk. Finally upload clean.nwk to itol.embl.de, collapse the great-ape clade, color the Homo plus Pan branch, and export the figure as SVG.