square in soma in plotshape

The basics of how to develop, test, and use models.
Post Reply
Ziling Wang
Posts: 8
Joined: Mon Mar 25, 2024 2:45 am

square in soma in plotshape

Post by Ziling Wang »

When I draw the shape of a neuron, there is always a square at the location of the neuron cell body. However, changing the diameter of the soma does not change the size of the square. How can I remove this square as it affects the representation? The following are the code and a corresponding figure.

h.soma.diam = 1.
h.scale_bar.diam = 0.1
ps.show(0) # 不自动显示NEURON的窗口

# 使用Matplotlib进行绘图
ax = ps.plot(plt)
ax.view_init(elev = 90, azim = 105)

https://resonant-frame-a38.notion.site/ ... ba4bee5938
Site Admin
Posts: 6314
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

Re: square in soma in plotshape

Post by ted »

If a section's geometry is specified with the "stylized" method (assigning values to L and diam), the section will be a cylinder of length L and diameter diam, and it will look like a cylinder in graphical renderings that show diameter. If the geometry is specified with the pt3d method (a sequence of pt3dadd statements that specify diameter at two or more xyz locations along the centroid of the section, read about pt3dadd and related functions at nrn.readthedocs.io), the result will look much more "biological."

So how are you specifying your model's geometry? If you are reusing a morphology specification from NeuroMorpho.org, be sure to read about how they "standardize" soma morphology.
Post Reply