Skill Tracer
Skills › Scientific Agent Skills › etetoolkit › visualization.md

visualization.md

537 lines · skills/etetoolkit/references/visualization.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# ETE 4 Visualization
2
3ETE 4 has two drawing systems:
4
5- **SmartView**: current web-based explorer and adaptive renderer; best for
6 interactive work and very large trees
7- **Treeview**: optional Qt renderer retained for static PNG, PDF, and SVG
8
9Do not mix their layout or face classes. SmartView classes live under
10`ete4.smartview`; Qt classes live under `ete4.treeview`.

ETE 4 Visualization

ETE 4 has two drawing systems:

  • SmartView: current web-based explorer and adaptive renderer; best for interactive work and very large trees
  • Treeview: optional Qt renderer retained for static PNG, PDF, and SVG

Do not mix their layout or face classes. SmartView classes live under ete4.smartview; Qt classes live under ete4.treeview.

Raw lines 1 to 11
12## Renderer Decision
14Use SmartView when:
16- Exploring, searching, collapsing, or editing interactively
17- Serving a tree locally or through an SSH tunnel
18- Exploring from a long-lived Jupyter kernel through the browser
19- Creating a raster PNG screenshot
20- Manually downloading the current browser view as SVG or PNG
21- Working with a tree too large to draw fully expanded
23Use Qt treeview when:
25- Programmatic or headless output must be PDF or SVG
26- Physical drawing dimensions or raster DPI matter
27- Maintaining an existing ETE treeview layout

Renderer Decision

Use SmartView when:

  • Exploring, searching, collapsing, or editing interactively
  • Serving a tree locally or through an SSH tunnel
  • Exploring from a long-lived Jupyter kernel through the browser
  • Creating a raster PNG screenshot
  • Manually downloading the current browser view as SVG or PNG
  • Working with a tree too large to draw fully expanded

Use Qt treeview when:

  • Programmatic or headless output must be PDF or SVG
  • Physical drawing dimensions or raster DPI matter
  • Maintaining an existing ETE treeview layout
Raw lines 12 to 28
29## Installation
31Interactive SmartView is included in the base package:
33```bash
34uv pip install "ete4==4.4.0"
35```
37Static SmartView screenshots use Selenium:
39```bash
40uv pip install "ete4[render-sm]==4.4.0"
41```
43Qt rendering uses PyQt6:
45```bash
46uv pip install "ete4[treeview]==4.4.0"
47```

Installation

Interactive SmartView is included in the base package:

uv pip install "ete4==4.4.0"

Static SmartView screenshots use Selenium:

uv pip install "ete4[render-sm]==4.4.0"

Qt rendering uses PyQt6:

uv pip install "ete4[treeview]==4.4.0"
Raw lines 29 to 48
49## Interactive SmartView

Interactive SmartView

Raw lines 49 to 50
51### Python
53```python
54from pathlib import Path
56from ete4 import Tree
58with Path("tree.nw").open(encoding="utf-8") as handle:
59 tree = Tree(handle, parser=1)
61tree.explore()
62```
64With no `layouts` argument, ETE applies `BASIC_LAYOUT`, which displays leaf
65names, branch lengths, and support.
67`explore()` returns immediately. A standalone script must keep the process
68alive, for example with `input()`, or use `keep_server=True`. The bundled
69visualization helper waits and stops the server cleanly.
71In Jupyter/IPython, SmartView is still browser-based; the current documentation
72does not provide an inline SmartView widget. Keep the kernel alive and open the
73served URL.

Python

from pathlib import Path

from ete4 import Tree

with Path("tree.nw").open(encoding="utf-8") as handle:
    tree = Tree(handle, parser=1)

tree.explore()

With no layouts argument, ETE applies BASIC_LAYOUT, which displays leaf names, branch lengths, and support.

explore() returns immediately. A standalone script must keep the process alive, for example with input(), or use keep_server=True. The bundled visualization helper waits and stops the server cleanly.

In Jupyter/IPython, SmartView is still browser-based; the current documentation does not provide an inline SmartView widget. Keep the kernel alive and open the served URL.

Raw lines 51 to 74
75### Command line
77```bash
78ete4 explore -t tree.nw --src_tree_format 1
79```
81Inspect the active release's full options:
83```bash
84ete4 explore --help
85```
87The CLI supports basic source-tree selection and parser options. Although ETE
884.4.0 help exposes `--face`, its handler does not apply that argument; use
89Python `Layout` objects for customization.

Command line

ete4 explore -t tree.nw --src_tree_format 1

Inspect the active release's full options:

ete4 explore --help

The CLI supports basic source-tree selection and parser options. Although ETE 4.4.0 help exposes --face, its handler does not apply that argument; use Python Layout objects for customization.

Raw lines 75 to 90
91### Control the server
93```python
94tree.explore(
95 host="127.0.0.1",
96 port=5000,
97 open_browser=False,
99```
101Keep the default loopback binding unless remote access is intentionally
102secured. For a remote host, tunnel the loopback port:
104```bash
105ssh -L 5000:localhost:5000 user@remote-host
106```
108Then open `http://localhost:5000` locally. Do not expose an unauthenticated
109explorer on `0.0.0.0` to an untrusted network.

Control the server

tree.explore(
    host="127.0.0.1",
    port=5000,
    open_browser=False,
)

Keep the default loopback binding unless remote access is intentionally secured. For a remote host, tunnel the loopback port:

ssh -L 5000:localhost:5000 user@remote-host

Then open http://localhost:5000 locally. Do not expose an unauthenticated explorer on 0.0.0.0 to an untrusted network.

Raw lines 91 to 110
111## SmartView Layouts
113A SmartView `Layout` combines:
115- `draw_tree(tree)`: tree-wide style and header/legend faces
116- `draw_node(node[, collapsed])`: styles and faces for individual nodes
117- `name`: GUI identifier
118- `cache_size`: memoization control for node drawing

SmartView Layouts

A SmartView Layout combines:

  • draw_tree(tree): tree-wide style and header/legend faces
  • draw_node(node[, collapsed]): styles and faces for individual nodes
  • name: GUI identifier
  • cache_size: memoization control for node drawing
Raw lines 111 to 119
120### Circular tree with labels and support
122```python
123from ete4 import Tree
124from ete4.smartview import Layout, PropFace, TextFace
126tree = Tree("((A:1,B:1)95:0.2,C:1);", parser="support")
129def draw_tree(_tree):
130 yield {
131 "shape": "circular",
132 "node-height-min": 8,
133 "content-height-min": 4,
134 }
135 yield TextFace(
136 "Example phylogeny",
137 fs_min=8,
138 fs_max=22,
139 position="header",
140 )
143def draw_node(node):
144 if node.is_leaf:
145 yield PropFace(
146 "name",
147 fs_min=4,
148 fs_max=16,
149 position="right",
150 )
151 return
153 if node.support is not None:
154 yield TextFace(
155 f"{node.support:g}",
156 fs_min=3,
157 fs_max=12,
158 style={"fill": "#555"},
159 position="top",
160 )
163layout = Layout(
164 "circular labels and support",
165 draw_tree=draw_tree,
166 draw_node=draw_node,
169tree.explore(layouts=[layout])
170```

Circular tree with labels and support

from ete4 import Tree
from ete4.smartview import Layout, PropFace, TextFace

tree = Tree("((A:1,B:1)95:0.2,C:1);", parser="support")


def draw_tree(_tree):
    yield {
        "shape": "circular",
        "node-height-min": 8,
        "content-height-min": 4,
    }
    yield TextFace(
        "Example phylogeny",
        fs_min=8,
        fs_max=22,
        position="header",
    )


def draw_node(node):
    if node.is_leaf:
        yield PropFace(
            "name",
            fs_min=4,
            fs_max=16,
            position="right",
        )
        return

    if node.support is not None:
        yield TextFace(
            f"{node.support:g}",
            fs_min=3,
            fs_max=12,
            style={"fill": "#555"},
            position="top",
        )


layout = Layout(
    "circular labels and support",
    draw_tree=draw_tree,
    draw_node=draw_node,
)

tree.explore(layouts=[layout])
Raw lines 120 to 171
172### Conditional node styling
174Support values may be fractions or percentages. Set one explicit convention
175for the entire source; a value of 1 cannot disambiguate them:
177```python
178import math
179from ete4 import Tree
180from ete4.smartview import Layout, PropFace
182tree = Tree("((A:1,B:1)95:0.2,C:1);", parser="support")
183SUPPORT_MAX = 100 # use 1 only for a verified fractional source
186def support_fraction(value):
187 if value is None:
188 return None
189 if not math.isfinite(value) or not 0 <= value <= SUPPORT_MAX:
190 raise ValueError("Support is outside the declared source range")
191 return value / SUPPORT_MAX
194def draw_node(node):
195 if node.is_leaf:
196 yield PropFace("name", position="right")
198 support = support_fraction(node.support)
199 if support is None:
200 color = "#888"
201 elif support >= 0.9:
202 color = "#1b7837"
203 elif support >= 0.7:
204 color = "#e08214"
205 else:
206 color = "#b2182b"
208 yield {
209 "dot": {
210 "shape": "circle",
211 "radius": 5,
212 "fill": color,
213 }
214 }
217layout = Layout("support colors", draw_node=draw_node)
218tree.explore(layouts=[layout])
219```

Conditional node styling

Support values may be fractions or percentages. Set one explicit convention for the entire source; a value of 1 cannot disambiguate them:

import math
from ete4 import Tree
from ete4.smartview import Layout, PropFace

tree = Tree("((A:1,B:1)95:0.2,C:1);", parser="support")
SUPPORT_MAX = 100  # use 1 only for a verified fractional source


def support_fraction(value):
    if value is None:
        return None
    if not math.isfinite(value) or not 0 <= value <= SUPPORT_MAX:
        raise ValueError("Support is outside the declared source range")
    return value / SUPPORT_MAX


def draw_node(node):
    if node.is_leaf:
        yield PropFace("name", position="right")

    support = support_fraction(node.support)
    if support is None:
        color = "#888"
    elif support >= 0.9:
        color = "#1b7837"
    elif support >= 0.7:
        color = "#e08214"
    else:
        color = "#b2182b"

    yield {
        "dot": {
            "shape": "circle",
            "radius": 5,
            "fill": color,
        }
    }


layout = Layout("support colors", draw_node=draw_node)
tree.explore(layouts=[layout])
Raw lines 172 to 220
221### Tree style keys
223Common tree-wide keys:
225- `shape`: `"rectangular"` or `"circular"`
226- `radius`: circular layout radius
227- `angle-start`, `angle-end`, `angle-span`: circular extent
228- `node-height-min`: collapse threshold in pixels
229- `content-height-min`: minimum height before faces appear
230- `collapsed`: collapsed-node style
231- `show-popup-props`, `hide-popup-props`: property disclosure
232- `is-leaf-fn`: dynamic terminal-node rule
233- `box`, `dot`, `hz-line`, `vt-line`: default CSS-like styles
235Example:
237```python
238tree_style = {
239 "shape": "circular",
240 "angle-start": -180,
241 "angle-span": 180,
242 "node-height-min": 10,
243 "collapsed": {
244 "shape": "outline",
245 "fill-opacity": 0.6,
246 },
247 "show-popup-props": ["name", "dist", "support", "group"],
250layout = Layout("semicircle", draw_tree=tree_style)
251tree.explore(layouts=[layout])
252```
254Limit popup properties when nodes contain sensitive or irrelevant metadata.

Tree style keys

Common tree-wide keys:

  • shape: "rectangular" or "circular"
  • radius: circular layout radius
  • angle-start, angle-end, angle-span: circular extent
  • node-height-min: collapse threshold in pixels
  • content-height-min: minimum height before faces appear
  • collapsed: collapsed-node style
  • show-popup-props, hide-popup-props: property disclosure
  • is-leaf-fn: dynamic terminal-node rule
  • box, dot, hz-line, vt-line: default CSS-like styles

Example:

tree_style = {
    "shape": "circular",
    "angle-start": -180,
    "angle-span": 180,
    "node-height-min": 10,
    "collapsed": {
        "shape": "outline",
        "fill-opacity": 0.6,
    },
    "show-popup-props": ["name", "dist", "support", "group"],
}

layout = Layout("semicircle", draw_tree=tree_style)
tree.explore(layouts=[layout])

Limit popup properties when nodes contain sensitive or irrelevant metadata.

Raw lines 221 to 255
256## SmartView Faces
258Common classes from `ete4.smartview`:
260- `TextFace`: literal text
261- `PropFace`: one node property with optional formatting
262- `EvalTextFace`: expression-derived text
263- `CircleFace`, `RectFace`, `BoxFace`: shapes
264- `ImageFace`: image
265- `SeqFace`: molecular sequence
266- `LegendFace`: legend
268Positions include `top`, `bottom`, `left`, `right`, and `aligned`; tree-level
269text can also use `header`.

SmartView Faces

Common classes from ete4.smartview:

  • TextFace: literal text
  • PropFace: one node property with optional formatting
  • EvalTextFace: expression-derived text
  • CircleFace, RectFace, BoxFace: shapes
  • ImageFace: image
  • SeqFace: molecular sequence
  • LegendFace: legend

Positions include top, bottom, left, right, and aligned; tree-level text can also use header.

Raw lines 256 to 270
271### Aligned metadata columns
273```python
274from ete4.smartview import Layout, PropFace
277def draw_node(node):
278 if not node.is_leaf:
279 return
280 yield PropFace("name", position="aligned", column=0)
281 yield PropFace("host", position="aligned", column=1)
282 yield PropFace("location", position="aligned", column=2)
285layout = Layout("sample metadata", draw_node=draw_node)
286tree.explore(layouts=[layout])
287```

Aligned metadata columns

from ete4.smartview import Layout, PropFace


def draw_node(node):
    if not node.is_leaf:
        return
    yield PropFace("name", position="aligned", column=0)
    yield PropFace("host", position="aligned", column=1)
    yield PropFace("location", position="aligned", column=2)


layout = Layout("sample metadata", draw_node=draw_node)
tree.explore(layouts=[layout])
Raw lines 271 to 288
289### Collapsed-node behavior
291For a special collapsed representation, accept a second argument:
293```python
294from ete4.smartview import Layout, TextFace
297def draw_node(node, collapsed):
298 if node.name != "large_clade":
299 return
300 text = "large_clade (collapsed)" if collapsed else "large_clade"
301 return TextFace(text, position="right")
304layout = Layout("collapsed label", draw_node=draw_node)
305tree.explore(layouts=[layout])
306```
308Use collapse thresholds instead of trying to render every face for tens of
309thousands of leaves.

Collapsed-node behavior

For a special collapsed representation, accept a second argument:

from ete4.smartview import Layout, TextFace


def draw_node(node, collapsed):
    if node.name != "large_clade":
        return
    text = "large_clade (collapsed)" if collapsed else "large_clade"
    return TextFace(text, position="right")


layout = Layout("collapsed label", draw_node=draw_node)
tree.explore(layouts=[layout])

Use collapse thresholds instead of trying to render every face for tens of thousands of leaves.

Raw lines 289 to 310
311## SmartView Static PNG
313```python
314from ete4 import Tree
315from ete4.smartview import Layout, PropFace
317tree = Tree("((A:1,B:1),C:1);")
320def draw_node(node):
321 if node.is_leaf:
322 return PropFace("name", position="right")
325layout = Layout("leaf labels", draw_node=draw_node)
326tree.render_sm(
327 "tree.png",
328 layouts=[layout],
329 w=1200,
330 h=800,
332```
334In ETE 4.4.0, `render_sm()` captures PNG screenshot data. Give the output a
335`.png` suffix. Supplying `.svg` or `.pdf` does not convert the screenshot to a
336vector format.
338ETE 4.4.0 warns and returns without creating a file when Selenium is absent;
339that return is not successful rendering. The bundled helper checks the
340dependency and requires a PNG signature before replacing the destination.
342SmartView header faces occupy the aligned panel; a long title at a narrow
343viewport can be clipped. Shorten the title or increase the width, then inspect
344the image at its final size.
346Static SmartView rendering needs a browser usable by Selenium. If browser
347discovery fails, install a compatible Chrome/Chromium browser or use Qt
348treeview.
350The interactive SmartView browser can download its current view as SVG or PNG
351and export Newick. That browser action is distinct from `render_sm()`, which is
352PNG-only and has no PDF mode.

SmartView Static PNG

from ete4 import Tree
from ete4.smartview import Layout, PropFace

tree = Tree("((A:1,B:1),C:1);")


def draw_node(node):
    if node.is_leaf:
        return PropFace("name", position="right")


layout = Layout("leaf labels", draw_node=draw_node)
tree.render_sm(
    "tree.png",
    layouts=[layout],
    w=1200,
    h=800,
)

In ETE 4.4.0, render_sm() captures PNG screenshot data. Give the output a .png suffix. Supplying .svg or .pdf does not convert the screenshot to a vector format.

ETE 4.4.0 warns and returns without creating a file when Selenium is absent; that return is not successful rendering. The bundled helper checks the dependency and requires a PNG signature before replacing the destination.

SmartView header faces occupy the aligned panel; a long title at a narrow viewport can be clipped. Shorten the title or increase the width, then inspect the image at its final size.

Static SmartView rendering needs a browser usable by Selenium. If browser discovery fails, install a compatible Chrome/Chromium browser or use Qt treeview.

The interactive SmartView browser can download its current view as SVG or PNG and export Newick. That browser action is distinct from render_sm(), which is PNG-only and has no PDF mode.

Raw lines 311 to 353
354## Qt Treeview for PNG/PDF/SVG
356Treeview classes are not top-level ETE 4 imports.
358```python
359from ete4 import Tree
360from ete4.treeview import NodeStyle, TextFace, TreeStyle
362tree = Tree("((A:1,B:1)95:0.2,C:1);", parser="support")
364for node in tree.traverse():
365 style = NodeStyle()
366 style["size"] = 6 if node.is_leaf else 4
367 style["fgcolor"] = "navy" if node.is_leaf else "gray"
368 node.set_style(style)
370tree_style = TreeStyle()
371tree_style.show_leaf_name = True
372tree_style.show_branch_support = True
373tree_style.show_scale = True
374tree_style.title.add_face(
375 TextFace("Example phylogeny", fsize=18, bold=True),
376 column=0,
379tree.render(
380 "tree.svg",
381 w=180,
382 units="mm",
383 tree_style=tree_style,
385tree.render(
386 "tree.pdf",
387 w=180,
388 units="mm",
389 tree_style=tree_style,
391tree.render(
392 "tree.png",
393 w=2400,
394 units="px",
395 dpi=300,
396 tree_style=tree_style,
398```
400ETE 4.4.0's Qt PDF path selects A4 paper. Width/height control the drawing;
401they do not set a tightly cropped PDF page. Inspect the PDF page bounds and
402crop in a separate graphics/PDF tool if needed, or use SVG for a tight vector
403canvas. The local PDF smoke confirmed the A4 page and its surrounding whitespace.
405Qt treeview still uses `TreeStyle`, `NodeStyle`, and Qt face classes, but ETE 4
406predicates remain properties:
408```python
409if node.is_leaf:
410 ...
411```
413not:
415```python
416if node.is_leaf():
417 ...
418```

Qt Treeview for PNG/PDF/SVG

Treeview classes are not top-level ETE 4 imports.

from ete4 import Tree
from ete4.treeview import NodeStyle, TextFace, TreeStyle

tree = Tree("((A:1,B:1)95:0.2,C:1);", parser="support")

for node in tree.traverse():
    style = NodeStyle()
    style["size"] = 6 if node.is_leaf else 4
    style["fgcolor"] = "navy" if node.is_leaf else "gray"
    node.set_style(style)

tree_style = TreeStyle()
tree_style.show_leaf_name = True
tree_style.show_branch_support = True
tree_style.show_scale = True
tree_style.title.add_face(
    TextFace("Example phylogeny", fsize=18, bold=True),
    column=0,
)

tree.render(
    "tree.svg",
    w=180,
    units="mm",
    tree_style=tree_style,
)
tree.render(
    "tree.pdf",
    w=180,
    units="mm",
    tree_style=tree_style,
)
tree.render(
    "tree.png",
    w=2400,
    units="px",
    dpi=300,
    tree_style=tree_style,
)

ETE 4.4.0's Qt PDF path selects A4 paper. Width/height control the drawing; they do not set a tightly cropped PDF page. Inspect the PDF page bounds and crop in a separate graphics/PDF tool if needed, or use SVG for a tight vector canvas. The local PDF smoke confirmed the A4 page and its surrounding whitespace.

Qt treeview still uses TreeStyle, NodeStyle, and Qt face classes, but ETE 4 predicates remain properties:

if node.is_leaf:
    ...

not:

if node.is_leaf():
    ...
Raw lines 354 to 419
420### Circular Qt output
422```python
423tree_style = TreeStyle()
424tree_style.mode = "c"
425tree_style.arc_start = -180
426tree_style.arc_span = 180
427tree.render("semicircle.svg", tree_style=tree_style)
428```

Circular Qt output

tree_style = TreeStyle()
tree_style.mode = "c"
tree_style.arc_start = -180
tree_style.arc_span = 180
tree.render("semicircle.svg", tree_style=tree_style)
Raw lines 420 to 429
430### Headless Qt
432On a headless Linux host, a common first attempt is:
434```bash
435QT_QPA_PLATFORM=offscreen python render_tree.py
436```
438If the platform plugin or required shared libraries are unavailable, use
439SmartView PNG, a container with the Qt runtime, or render on a workstation.

Headless Qt

On a headless Linux host, a common first attempt is:

QT_QPA_PLATFORM=offscreen python render_tree.py

If the platform plugin or required shared libraries are unavailable, use SmartView PNG, a container with the Qt runtime, or render on a workstation.

Raw lines 430 to 440
Runs code python render_tree.py :435
441## Bundled Visualization Script
443Interactive SmartView:
445```bash
446uv run --no-project --isolated --with "ete4==4.4.0" python scripts/quick_visualize.py \
447 tree.nw --parser 1
448```
450SmartView PNG:
452```bash
453uv run --no-project --isolated --with "ete4[render-sm]==4.4.0" python scripts/quick_visualize.py \
454 tree.nw tree.png \
455 --parser support \
456 --mode circular \
457 --show-support \
458 --color-by-support --support-scale percent \
459 --title "Maximum-likelihood tree"
460```
462Qt SVG or PDF:
464```bash
465uv run --no-project --isolated --with "ete4[treeview]==4.4.0" python scripts/quick_visualize.py \
466 tree.nw tree.svg \
467 --parser 1 \
468 --engine treeview \
469 --mode rectangular \
470 --title "Species tree"
471```
473Support coloring requires `--support-scale percent` (0–100) or `fraction`
474(0–1). Thresholds remain fractions in both cases. Invalid or nonfinite support
475values fail before rendering.
477The script's `auto` engine chooses SmartView for interactive use and PNG,
478and Qt treeview for PDF/SVG.

Bundled Visualization Script

Interactive SmartView:

uv run --no-project --isolated --with "ete4==4.4.0" python scripts/quick_visualize.py \
  tree.nw --parser 1

SmartView PNG:

uv run --no-project --isolated --with "ete4[render-sm]==4.4.0" python scripts/quick_visualize.py \
  tree.nw tree.png \
  --parser support \
  --mode circular \
  --show-support \
  --color-by-support --support-scale percent \
  --title "Maximum-likelihood tree"

Qt SVG or PDF:

uv run --no-project --isolated --with "ete4[treeview]==4.4.0" python scripts/quick_visualize.py \
  tree.nw tree.svg \
  --parser 1 \
  --engine treeview \
  --mode rectangular \
  --title "Species tree"

Support coloring requires --support-scale percent (0–100) or fraction (0–1). Thresholds remain fractions in both cases. Invalid or nonfinite support values fail before rendering.

The script's auto engine chooses SmartView for interactive use and PNG, and Qt treeview for PDF/SVG.

Raw lines 441 to 479
Runs code python scripts/quick_visualize.py :446
480## Publication Checklist
482- Prefer SVG/PDF for line art that will be resized or edited.
483- Use explicit physical width for journal figures.
484- Check support scale before mapping colors or labels.
485- Use a colorblind-safe palette and do not rely on color alone.
486- Keep tip labels legible at final print size.
487- State rooting, branch-length units, and support statistic in the caption.
488- Export only intended node properties.
489- Test the exact artifact, not just the interactive explorer.

Publication Checklist

  • Prefer SVG/PDF for line art that will be resized or edited.
  • Use explicit physical width for journal figures.
  • Check support scale before mapping colors or labels.
  • Use a colorblind-safe palette and do not rely on color alone.
  • Keep tip labels legible at final print size.
  • State rooting, branch-length units, and support statistic in the caption.
  • Export only intended node properties.
  • Test the exact artifact, not just the interactive explorer.
Raw lines 480 to 490
491## Troubleshooting

Troubleshooting

Raw lines 491 to 492
493### `ImportError` for SmartView static rendering
495```bash
496uv pip install "ete4[render-sm]==4.4.0"
497```

ImportError for SmartView static rendering

uv pip install "ete4[render-sm]==4.4.0"
Raw lines 493 to 498
499### `ImportError` for Qt classes
501Use:
503```python
504from ete4.treeview import NodeStyle, TreeStyle
505```
507after:
509```bash
510uv pip install "ete4[treeview]==4.4.0"
511```

ImportError for Qt classes

Use:

from ete4.treeview import NodeStyle, TreeStyle

after:

uv pip install "ete4[treeview]==4.4.0"
Raw lines 499 to 512
513### Tree renders without expected names or support
515The likely cause is the parser. Re-read using `parser="name"` or
516`parser="support"` as appropriate and inspect:
518```python
519print(tree.to_str(props=["name", "dist", "support"], compact=True))
520```

Tree renders without expected names or support

The likely cause is the parser. Re-read using parser="name" or parser="support" as appropriate and inspect:

print(tree.to_str(props=["name", "dist", "support"], compact=True))
Raw lines 513 to 521
522### Large tree appears collapsed
524SmartView adaptively collapses branches below `node-height-min`. Zoom in or
525lower the threshold in a layout.

Large tree appears collapsed

SmartView adaptively collapses branches below node-height-min. Zoom in or lower the threshold in a layout.

Raw lines 522 to 526
527## Upstream References
529- SmartView tutorial:
530 https://etetoolkit.github.io/ete/tutorial/tutorial_smartview.html
531- SmartView API:
532 https://etetoolkit.github.io/ete/reference/reference_smartview.html
533- Qt treeview tutorial:
534 https://etetoolkit.github.io/ete/tutorial/tutorial_treeview.html
535- Qt treeview API:
536 https://etetoolkit.github.io/ete/reference/reference_treeview.html
537- ETE Gallery: https://github.com/etetoolkit/ete-gallery

Upstream References

  • SmartView tutorial: https://etetoolkit.github.io/ete/tutorial/tutorial_smartview.html
  • SmartView API: https://etetoolkit.github.io/ete/reference/reference_smartview.html
  • Qt treeview tutorial: https://etetoolkit.github.io/ete/tutorial/tutorial_treeview.html
  • Qt treeview API: https://etetoolkit.github.io/ete/reference/reference_treeview.html
  • ETE Gallery: https://github.com/etetoolkit/ete-gallery
Raw lines 527 to 537