traja.accessor.TrajaAccessor.plot_heatmap

TrajaAccessor.plot_heatmap(bins: int = 50, cmap: str = 'hot', **kwargs)[source]

Plot 2D heatmap showing time spent in each location.

Parameters:
  • bins (int) – Number of bins for 2D histogram. Default 50.

  • cmap (str) – Matplotlib colormap name. Default ‘hot’.

  • **kwargs – Additional arguments passed to plt.imshow

Returns:

Heatmap axes

Return type:

matplotlib.axes.Axes

Example

>>> ax = df.traja.plot_heatmap(bins=30)
>>> plt.show()