{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Create 12 freely placed iaf_psc_alpha neurons\n\nBCCN Tutorial @ CNS*09\nHans Ekkehard Plesser, UMB\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import nest\nimport matplotlib.pyplot as plt\n\nnest.ResetKernel()\n\npos = nest.spatial.free([nest.random.uniform(-0.75, 0.75), nest.random.uniform(-0.5, 0.5)], extent=[2., 1.5])\n\nl1 = nest.Create('iaf_psc_alpha', 12, positions=pos)\n\nnest.PrintNodes()\n\nnest.PlotLayer(l1, nodesize=50)\n\n# beautify\nplt.axis([-1.0, 1.0, -0.75, 0.75])\nplt.axes().set_aspect('equal', 'box')\nplt.axes().set_xticks((-0.75, -0.25, 0.25, 0.75))\nplt.axes().set_yticks((-0.5, 0, 0.5))\nplt.grid(True)\nplt.xlabel('Extent: 2.0')\nplt.ylabel('Extent: 1.5')\n\nplt.show()\n\n# plt.savefig('grid_iaf_irr.png')"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.8.6"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}