spiketools.plts.spatial.plot_heatmap¶
- spiketools.plts.spatial.plot_heatmap(data, smooth=False, smoothing_kernel=1.5, ignore_zero=False, cbar=False, cmap=None, vmin=None, vmax=None, transpose=False, invert=None, ax=None, **plt_kwargs)[source]¶
Plot a spatial heat map.
- Parameters:
- data2d array
Measure to plot across a grided environment.
- smoothbool, optional, default: False
Whether to smooth the data before plotting.
- smoothing_kernelfloat, optional, default: 1.5
Standard deviation of the gaussian kernel to apply for smoothing.
- ignore_zerobool, optional, default: False
If True, replaces 0’s with NaN for plotting.
- cbarbool, optional, default: False
Whether to add a colorbar to the plot.
- cmapstr, optional
Which colormap to use to plot.
- vmin, vmaxfloat, optional
Min and max plot ranges.
- transposebool, optional, default: False
Whether to transpose the data before plotting.
- invert{‘x’, ‘y’, ‘both’}, optional
If provided, inverts the plot axes over x, y or both axes. Note that invert x is equivalent to flipping the data left/right, and y to flipping up/down.
- axAxes, optional
Axis object upon which to plot.
- plt_kwargs
Additional arguments to pass into the plot function.
Notes
This function uses plt.imshow to visualize the matrix. Note that in doing so, it defaults to setting the origin to ‘lower’. This setting can be overwritten by passing in a value for origin.