Spatial networks: 4x3 gridΒΆ

Run this example as a Jupyter notebook:

See our guide for more information and troubleshooting.

Create a population of iaf_psc_alpha neurons on a 4x3 grid.

BCCN Tutorial @ CNS*09 Hans Ekkehard Plesser, UMB

import matplotlib.pyplot as plt
import nest


l1 = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[4, 3], extent=[2.0, 1.5]))


nest.PlotLayer(l1, nodesize=50)

# beautify
plt.axis([-1.0, 1.0, -0.75, 0.75])
plt.axes().set_aspect("equal", "box")
plt.axes().set_xticks((-0.75, -0.25, 0.25, 0.75))
plt.axes().set_yticks((-0.5, 0, 0.5))
plt.xlabel("4 Columns, Extent: 1.5")
plt.ylabel("2 Rows, Extent: 1.0")

# plt.savefig('grid_iaf.png')

Gallery generated by Sphinx-Gallery