hnn_core.viz.plot_cell_morphology

hnn_core.viz.plot_cell_morphology(cell, ax, color=None, pos=(0, 0, 0), xlim=(-250, 150), ylim=(-100, 100), zlim=(-100, 1200), show=True)[source]

Plot the cell morphology.

Parameters:
cellinstance of Cell

The cell object

axinstance of Axes3D

Matplotlib 3D axis

showbool

If True, show the plot

colorstr | dict | None

Color of cell. If str, entire cell plotted with color indicated by str. If dict, colors of individual sections can be specified. Must have a key for every section in cell as defined in the Cell.sections attribute.

Ex: {'apical_trunk': 'r', 'soma': 'b', ...}
postuple of int or float | None

Position of cell soma. Must be a tuple of 3 elements for the (x, y, z) position of the soma in 3D space. Default: (0, 0, 0)

xlimtuple of int | tuple of float

x limits of plot window. Default (-250, 150)

ylimtuple of int | tuple of float

y limits of plot window. Default (-100, 100)

zlimtuple of int | tuple of float

z limits of plot window. Default (-100, 1200)

showbool

If True, show the plot

Returns:
axeslist of instance of Axes3D

The matplotlib 3D axis handle.