What LC16 and LC6 look like¶
LC16 and LC6 dendrites sit in the same lobula layers
(the shape half of the input comparison in
lc16_lc6_inputs).
A skeleton is a thin tree tracing a neuron's cable;
it is enough to compare where dendrites sit and where axons go.
The skeletons are the ones collect.collect_skeletons stored,
each type in its color from look.
neurons = load_skeletons(load_census(), TYPES)
pl.Series([_n.name.split("_")[0] for _n in neurons]).value_counts()
shape: (2, 2)
| count | |
|---|---|
| str | u32 |
| "LC16" | 6 |
| "LC6" | 6 |
plot_neurons draws the neurons in 3D, colored by type:
drag to rotate, scroll to zoom.
Dendrites are the dense tufts in the lobula;
each type's axons run to its own target in the central brain.
def plot_neurons(neurons: list):
"""A plotly 3D figure of the neurons, colored by the type in the
name of each (the part before the underscore)."""
colors = [TYPE_COLORS[n.name.split("_")[0]] for n in neurons]
fig = navis.plot3d(neurons, color=colors, backend="plotly", inline=False)
# plot3d's return type allows None for inline backends;
# plotly with inline=False always returns a figure.
if fig is None:
msg = "navis.plot3d returned no figure"
raise RuntimeError(msg)
return fig
_fig = plot_neurons(neurons)
# The CDN plotly keeps the HTML small;
# the file needs a network connection to open.
_fig.write_html(figure_path("lc16_lc6_3d.html"), include_plotlyjs="cdn")
_fig
INFO : Use the `.show()` method to plot the figure. (navis)