plot_layer

Contents

plot_layer#

class brainpy.state.spatial.plot_layer(layer, fig=None, nodecolor='b', nodesize=20)[source]#

Scatter a layer’s node positions (NEST PlotLayer).

Parameters:
  • layer (Layer) – A concrete 2-D / 3-D position layer.

  • fig (matplotlib.figure.Figure, optional) – Existing figure to draw on; a new one is created when None.

  • nodecolor (color, optional) – Marker colour. Default 'b'.

  • nodesize (float, optional) – Marker size. Default 20.

Returns:

The figure drawn on.

Return type:

matplotlib.figure.Figure

Examples

>>> from brainpy import state as bp
>>> fig = bp.spatial.plot_layer(bp.spatial.grid([10, 10]))