plot3d.neuron | R Documentation |
Plot neurons in 3D using rgl library
## S3 method for class 'neuron'
plot3d(
x,
WithLine = TRUE,
NeuronNames = FALSE,
WithNodes = TRUE,
WithAllPoints = FALSE,
WithText = FALSE,
PlotSubTrees = TRUE,
add = TRUE,
col = NULL,
soma = FALSE,
...
)
x |
A neuron to plot |
WithLine |
Whether to plot lines for all segments in neuron |
NeuronNames |
Logical indicating whether to label the neuron in the plot using the NeuronName field or a character vector of names. |
WithNodes |
Whether to plot dots for branch and end points |
WithAllPoints |
Whether to plot dots for all points in the neuron |
WithText |
Whether to label plotted points with their numeric id (see details) |
PlotSubTrees |
Whether to plot all sub trees when the neuron is not fully connected. |
add |
Whether to add the neuron to existing rgl plot rather than clearing the scene (default TRUE) |
col |
Colour specification (see rgl materials) |
soma |
Whether to plot a sphere at neuron's origin representing the
soma. Either a logical value or a numeric indicating the radius (default
|
... |
Additional arguments passed to rgl::lines3d |
Note that when WithText=TRUE
, the numeric identifiers plotted
are raw indices into the x$d
array of the neuron
,
not the values of the PointNo
column.
list of rgl plotting ids (invisibly) separated into lines
,
points
, texts
according to plot element. See
rgl::plot3d
for details.
plot3d.neuronlist
, plot3d.dotprops
,
nat::plot3d
, rgl::plot3d
# A new plot would have been opened if required
open3d()
plot3d(Cell07PNs[[1]],col='red')
plot3d(Cell07PNs[[2]],col='green')
# clear the current plot
clear3d()
plot3d(Cell07PNs[[2]],col='blue',add=FALSE)
# plot the number of all nodes
clear3d()
plot3d(Cell07PNs[[2]],col='red',WithText=TRUE,add=FALSE)
# include cell bodies
plot3d(Cell07PNs[3:4], col='red', soma=TRUE)
plot3d(Cell07PNs[5], col='red', soma=3)
close3d()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.