braincell.vis.compare_morphologies#
- braincell.vis.compare_morphologies(morphologies, *, titles=None, layout=None, shape=None, align='soma', figsize=None, min_branch_angle_deg=25.0, root_layout='type_split', layout_config=None)[source]#
Render several morphologies side by side with a shared layout.
- Parameters:
morphologies (
Sequence[Any]) – Morphologies to compare. Order left → right matches panel order. Must contain at least one element.titles (
Sequence[str] |None) – Optional panel titles; defaults tomorpho.name(or"morpho_{i}"for unnamed trees).layout (
str|None) – Layout family passed toplot2d()for every panel.shape (
str|None) –"line"or"frustum", forwarded toplot2d().align (
str|None) – Origin alignment hint. Currently informational — the per-morphology layout engine always roots at the soma — but recorded on the axes title so scripts can cross-reference a stated alignment policy.figsize (
tuple[float,float] |None) – Figure size. Defaults to(4.5 * n_panels, 4.5).min_branch_angle_deg (
float|None) – Forwarded verbatim toplot2d().layout_config (
LayoutConfig|None) – Forwarded verbatim toplot2d().
- Returns:
figure, axes – The composed figure and a tuple of the panel axes, left to right.
- Return type:
- Raises:
ValueError – If
morphologiesis empty.
Notes
All panels share data-space aspect ratio through
plot2d()(each call invokesax.set_aspect('equal')); the wrapper does not synchronise axis limits across panels because morphologies with different footprints would then be rendered at different scales.