braincell.vis module#
braincell.vis is the visualization layer of BrainCell. It turns a
Morphology (or any higher-level object that carries
one) into static plots through matplotlib, interactive 3D through PyVista
or Plotly, and publication-quality exports. The module is deliberately
split into three layers:
Scene builders (
scene2d/scene3d) translate a morphology plus an overlay spec into backend-agnostic primitive tuples.Backends (
backend_matplotlib,backend_pyvista,backend_plotly) render those primitives. Each backend advertises its supported scene kinds via a capability set.High-level entry points (
plot2d,plot3d,plot_movie,plot_traces, morphometry plots) are the user-facing surface.
Optional dependencies (matplotlib, pyvista, plotly) are
imported lazily inside the backend that uses them so the base install
stays small.
Top-level plot entry points#
Render a time-varying colour-by-values animation over a morphology. |
|
Plot time-series traces at selected morphology locations. |
Morphometry and topology plots#
Render a left-to-right dendrogram of the morphology. |
|
Render a topology-only schematic (length-ignored) of the morphology. |
|
Plot a Sholl-intersection curve. |
|
Bar chart of the number of branches per branch order. |
Comparison helpers#
Render several morphologies side by side with a shared layout. |
|
Render the same morphology with multiple value overlays. |
Interactivity hooks#
Styling, themes and configuration#
Temporarily override visualization defaults for the duration of a block. |
|
Activate the |
|
Save a vis backend return value to disk. |
Publication-quality styling preset for |
Scene primitives and overlays#
User-facing overlay request passed through |
|
Styling parameters for a color-by-values overlay. |
Layout engine#
Configurable parameters for the 2D layout engine. |
|
Size-bounded LRU cache for layout-branch builder results. |