braincell.vis.plot_dendrogram

braincell.vis.plot_dendrogram#

braincell.vis.plot_dendrogram(morpho, *, ax=None, color_by_type=True, linewidth=1.5)[source]#

Render a left-to-right dendrogram of the morphology.

Each branch is drawn as a horizontal stroke whose length equals the branch’s own total length. Children are stacked vertically and connected to their parent by a short vertical segment at the attachment x-coordinate.

Parameters:
  • morpho (Morphology) – Morphology to render.

  • ax (matplotlib Axes or None) – Destination axes. When None, a fresh figure is created.

  • color_by_type (bool) – If True (default), each branch is coloured using the shared color_for_branch_type() palette. Otherwise all strokes are black.

  • linewidth (float) – Stroke width for the horizontal branch lines.

Returns:

The axes drawn into.

Return type:

Any