plot_probability_parameter

plot_probability_parameter#

class brainpy.state.spatial.plot_probability_parameter(kernel, mask=None, extent=(-0.5, 0.5, -0.5, 0.5), shape=(100, 100), fig=None, cmap='Greys')[source]#

Heatmap of a connection kernel p(d) over a 2-D field (NEST PlotProbabilityParameter).

The kernel is evaluated for a single source at the origin against a regular grid of target positions spanning extent. When a mask is given the probability is zeroed outside it.

Parameters:
  • kernel (object) – A spatial kernel/expression (_eval_pair) or a bare callable p(distance).

  • mask (object, optional) – A spatial mask whose contains zeroes the probability outside it.

  • extent (tuple of float, optional) – (x_min, x_max, y_min, y_max) of the sampled field (micrometres). Default the unit box.

  • shape (tuple of int, optional) – (nx, ny) sample counts. Default (100, 100).

  • fig (matplotlib.figure.Figure, optional) – Existing figure to draw on.

  • cmap (str, optional) – Colormap name. Default 'Greys'.

Returns:

The figure drawn on.

Return type:

matplotlib.figure.Figure