norse.torch.utils.plot.plot_histogram_2d#
- norse.torch.utils.plot.plot_histogram_2d(spikes: torch.Tensor, axes: Optional[matplotlib.axes._axes.Axes] = None, **kwargs)[source]#
Plots a histogram of 1-dimensional data.
- Example:
>>> cell = LIF() >>> data = torch.ones(10, 10) + torch.randn(10, 10) >>> spikes, state = cell(data) >>> plot_histogram_2d(state.v)
- Arguments:
data (torch.Tensor): A tensor of single-dimensional data. axes (matplotlib.axes.Axes): The matplotlib axis to plot on, if any.
Defaults to
matplotlib.pyplot.gca()
- kwargs: Specific key-value arguments to style the figure
fed to the
matplotlib.pyplot.hist()
function.
- Returns:
An
matplotlib.axes.Axes
.