brainpy.visualization.line_plot

brainpy.visualization.line_plot(ts, val_matrix, plot_ids=None, ax=None, xlim=None, ylim=None, xlabel='Time (ms)', ylabel=None, legend=None, title=None, show=False)[source]

Show the specified value in the given object (Neurons or Synapses.)

Parameters
  • ts (np.ndarray) – The time steps.

  • val_matrix (np.ndarray) – The value matrix which record the history trajectory. It can be easily accessed by specifying the monitors of NeuGroup/SynConn by: neu/syn = NeuGroup/SynConn(..., monitors=[k1, k2])

  • plot_ids (None, int, tuple, a_list) – The index of the value to plot.

  • ax (None, Axes) – The figure to plot.

  • xlim (list, tuple) – The xlim.

  • ylim (list, tuple) – The ylim.

  • xlabel (str) – The xlabel.

  • ylabel (str) – The ylabel.

  • legend (str) – The prefix of legend for plot.

  • show (bool) – Whether show the figure.