Plotting module

bsb.plotting.hdf5_gdf_plot_spike_raster(spike_recorders, input_region=None, fig=None, show=True)[source]

Create a spike raster plot from an HDF5 group of spike recorders saved from NEST gdf files. Each HDF5 dataset includes the spike timings of the recorded cell populations, with spike times in the first row and neuron IDs in the second row.

bsb.plotting.hdf5_plot_spike_raster(spike_recorders, input_region=None, show=True, cutoff=0, cell_type_sort=None, cell_sort=None)[source]

Create a spike raster plot from an HDF5 group of spike recorders.

Parameters
  • input_region (2-element list-like) – Specifies an interval [min, max] on the x axis to highlight as active input to the simulation.

  • show (bool) – Immediately plot the result

  • cutoff (float) – Amount of ms initial simulation to ignore.

  • cell_type_sort (function-like) – A function to sort the cell types. Must take 2 dictionaries as arguments, being the raster plot’s x values per label and y values per label. Must return an array labels matching those of the x and y values to order them.

  • cell_sort (function-like) – A function that takes the cell type label and set of ids and returns a map to sort them.

bsb.plotting.plot_network(network, fig=None, cubic=True, swapaxes=True, show=True, legend=True, from_memory=True)[source]

Plot a network, either from the current cache or the storage.

bsb.plotting.set_morphology_scene_range(scene, offset_morphologies)[source]

Set the range on a scene containing multiple morphologies.

Parameters
  • scene – A scene of the figure. If the figure itself is given, figure.layout.scene will be used.

  • offset_morphologies – A list of tuples where the first element is offset and the 2nd is the Morphology