.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/spatial/grid_iaf_irr.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_spatial_grid_iaf_irr.py: Freely placed neurons ---------------------- Create 12 freely placed iaf_psc_alpha neurons. BCCN Tutorial @ CNS*09 Hans Ekkehard Plesser, UMB .. GENERATED FROM PYTHON SOURCE LINES 31-57 .. code-block:: default import nest import matplotlib.pyplot as plt nest.ResetKernel() pos = nest.spatial.free([nest.random.uniform(-0.75, 0.75), nest.random.uniform(-0.5, 0.5)], extent=[2., 1.5]) l1 = nest.Create('iaf_psc_alpha', 12, positions=pos) nest.PrintNodes() 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.grid(True) plt.xlabel('Extent: 2.0') plt.ylabel('Extent: 1.5') plt.show() # plt.savefig('grid_iaf_irr.png') .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_auto_examples_spatial_grid_iaf_irr.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: grid_iaf_irr.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: grid_iaf_irr.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_