neurom.view¶
View tools to visualize morphologies.
Functions
Plots Dendrogram of obj. |
|
Plots a 2D figure of the neuron, that contains a soma and the neurites. |
|
Generates a figure of the neuron, that contains a soma and a list of trees. |
|
Generates a 2d figure of the soma. |
|
Generates a 3d figure of the soma. |
|
Plots a 2d figure of the tree’s segments. |
|
Generates a figure of the tree in 3d. |
-
neurom.view.
plot_dendrogram
(ax, obj, show_diameters=True)[source]¶ Plots Dendrogram of obj.
- Parameters
ax – matplotlib axes
obj (neurom.Neuron, neurom.Section) – neuron or section
show_diameters (bool) – whether to show node diameters or not
-
neurom.view.
plot_neuron
(ax, nrn, neurite_type=<NeuriteType.all: 32>, plane='xy', soma_outline=True, diameter_scale=1.0, linewidth=1.2, color=None, alpha=0.8, realistic_diameters=False)[source]¶ Plots a 2D figure of the neuron, that contains a soma and the neurites.
- Parameters
ax (matplotlib axes) – on what to plot
neurite_type (NeuriteType) – an optional filter on the neurite type
nrn (neuron) – neuron to be plotted
soma_outline (bool) – should the soma be drawn as an outline
plane (str) – Any pair of ‘xyz’
diameter_scale (float) – Scale factor multiplied with segment diameters before plotting
linewidth (float) – all segments are plotted with this width, but only if diameter_scale=None
color (str or None) – Color of plotted values, None corresponds to default choice
alpha (float) – Transparency of plotted values
realistic_diameters (bool) – scale linewidths with axis data coordinates
-
neurom.view.
plot_neuron3d
(ax, nrn, neurite_type=<NeuriteType.all: 32>, diameter_scale=1.0, linewidth=1.2, color=None, alpha=0.8)[source]¶ Generates a figure of the neuron, that contains a soma and a list of trees.
- Parameters
ax (matplotlib axes) – on what to plot
nrn (neuron) – neuron to be plotted
neurite_type (NeuriteType) – an optional filter on the neurite type
diameter_scale (float) – Scale factor multiplied with segment diameters before plotting
linewidth (float) – all segments are plotted with this width, but only if diameter_scale=None
color (str or None) – Color of plotted values, None corresponds to default choice
alpha (float) – Transparency of plotted values
-
neurom.view.
plot_soma
(ax, soma, plane='xy', soma_outline=True, linewidth=1.2, color=None, alpha=0.8)[source]¶ Generates a 2d figure of the soma.
- Parameters
ax (matplotlib axes) – on what to plot
soma (neurom.core.Soma) – plotted soma
plane (str) – Any pair of ‘xyz’
soma_outline (bool) – should the soma be drawn as an outline
linewidth (float) – all segments are plotted with this width, but only if diameter_scale=None
color (str or None) – Color of plotted values, None corresponds to default choice
alpha (float) – Transparency of plotted values
-
neurom.view.
plot_soma3d
(ax, soma, color=None, alpha=0.8)[source]¶ Generates a 3d figure of the soma.
- Parameters
ax (matplotlib axes) – on what to plot
soma (neurom.core.Soma) – plotted soma
color (str or None) – Color of plotted values, None corresponds to default choice
alpha (float) – Transparency of plotted values
-
neurom.view.
plot_tree
(ax, tree, plane='xy', diameter_scale=1.0, linewidth=1.2, color=None, alpha=0.8, realistic_diameters=False)[source]¶ Plots a 2d figure of the tree’s segments.
- Parameters
ax (matplotlib axes) – on what to plot
tree (neurom.core.Section or neurom.core.Neurite) – plotted tree
plane (str) – Any pair of ‘xyz’
diameter_scale (float) – Scale factor multiplied with segment diameters before plotting
linewidth (float) – all segments are plotted with this width, but only if diameter_scale=None
color (str or None) – Color of plotted values, None corresponds to default choice
alpha (float) – Transparency of plotted values
realistic_diameters (bool) – scale linewidths with axis data coordinates
Note
If the tree contains one single point the plot will be empty since no segments can be constructed.
-
neurom.view.
plot_tree3d
(ax, tree, diameter_scale=1.0, linewidth=1.2, color=None, alpha=0.8)[source]¶ Generates a figure of the tree in 3d.
If the tree contains one single point the plot will be empty since no segments can be constructed.
- Parameters
ax (matplotlib axes) – on what to plot
tree (neurom.core.Section or neurom.core.Neurite) – plotted tree
diameter_scale (float) – Scale factor multiplied with segment diameters before plotting
linewidth (float) – all segments are plotted with this width, but only if diameter_scale=None
color (str or None) – Color of plotted values, None corresponds to default choice
alpha (float) – Transparency of plotted values