hello
I am looking for visualization tools of neural morphology to elaborately visualize the synapses on dendrites. I have noticed that NetPynne provides some pretty detailed visualizations of the cells and I was wondering what tools are used for that and/or whether NEURON provides any tools for elaborate morphology and synapse visualization.
thank you.
elaborate visualization of neuron morphologies and synapses
Moderator: tom_morse
-
- Posts: 69
- Joined: Wed Jun 17, 2015 5:31 pm
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: elaborate visualization of neuron morphologies and synapses
"Shape plots" (see the Programmer's Reference for documentation of the Shape and PlotShape classes) can be used to generate figures of parts of cells or any number of cells. These can be rendered by NEURON or by third-party Python libraries, e.g. matplotlib, plotly. To learn more, see Robert McDougal's presentations about using Python to build and work with NEURON models--starting with this one:
20210624 Python scripting day 1 https://youtu.be/ObSHSQCpkoo
You might also find this one to be useful:
20210706 Scripting and Morphologies https://youtu.be/yte708tOiVI
20210624 Python scripting day 1 https://youtu.be/ObSHSQCpkoo
You might also find this one to be useful:
20210706 Scripting and Morphologies https://youtu.be/yte708tOiVI
-
- Posts: 69
- Joined: Wed Jun 17, 2015 5:31 pm
Re: elaborate visualization of neuron morphologies and synapses
thank you Ted
I am looking for a way to annotate 3D points with layer information, or a method for displaying layers as well as indicating different synapse types by e.g. different colors. I haven't been able to find a method that does that using matplotlib according to the Shape plot documentation. Is this possible?
I am looking for a way to annotate 3D points with layer information, or a method for displaying layers as well as indicating different synapse types by e.g. different colors. I haven't been able to find a method that does that using matplotlib according to the Shape plot documentation. Is this possible?
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: elaborate visualization of neuron morphologies and synapses
What about the Shape plot class's color and color_list methods?
-
- Posts: 270
- Joined: Fri Nov 28, 2008 3:38 pm
- Location: Yale School of Public Health
Re: elaborate visualization of neuron morphologies and synapses
Why not something like:
You can pass regular matplotlib arguments to mark to specify color, marker type, etc.
Code: Select all
ps = h.PlotShape(False)
ps.plot(pyplot).mark(h.soma[0](0.5)).mark(h.apical_dendrite[68](1))
plt.show()
-
- Posts: 69
- Joined: Wed Jun 17, 2015 5:31 pm
Re: elaborate visualization of neuron morphologies and synapses
thank you this is useful for layer color-coding. I would still like to be able to color-code the different synapses (inhibitory-excitatory) or even from different presynaptic populations. I see that netpynne graphics do that on different examples. I am looking into those examples to see what graphics tools are used there, also any instructions on how to do this with NEURON would be great.
-
- Posts: 270
- Joined: Fri Nov 28, 2008 3:38 pm
- Location: Yale School of Public Health
Re: elaborate visualization of neuron morphologies and synapses
I don't understand the distinction that you're making. Synapses are at some specific location, and using the mark method of a matplotlib/plotly h.PlotShape (or the point_mark method of a h.Shape), you can put points at specific locations in whatever style... e.g. with a matplotlib PlotShape, you can put a black-x at soma(0.3) with:
For a full example, see https://colab.research.google.com/drive ... sp=sharing
Code: Select all
_ = ps.plot(plt, cmap=cm.RdBu).mark(soma(0.3), 'xk')
-
- Posts: 69
- Joined: Wed Jun 17, 2015 5:31 pm
Re: elaborate visualization of neuron morphologies and synapses
thanks. What about 3D markers? The example you sent, very useful, appears to work on 2D dendrites. How do I adjust this for 3D?
-
- Posts: 69
- Joined: Wed Jun 17, 2015 5:31 pm
Re: elaborate visualization of neuron morphologies and synapses
in addition to my previous question, I would like to recreate the visualization methods used by netpynne GUI. In the tutorials, they only refer to matplotlib examples however, I would like to use the tool on the graphical interface ideally. Any directions on how to find and install that visualization tool would be very helpful. Thank you again. http://34.123.79.237/user/255e1f0b-5414 ... 5/geppetto