tobac.plotting.plot_histogram_cellwise#

tobac.plotting.plot_histogram_cellwise(track, bin_edges, variable, quantity, axes=None, density=False, **kwargs)#

Plot the histogram of a variable based on the cells.

Parameters:
  • track (pandas.DataFrame) – DataFrame of the features containing the variable as column and a column ‘cell’.

  • bin_edges (int or ndarray) – If bin_edges is an int, it defines the number of equal-width bins in the given range. If bins is a sequence, it defines a monotonically increasing array of bin edges, including the rightmost edge.

  • variable (string) – Column of the DataFrame with the variable on which the histogram is to be based on. Default is None.

  • quantity ({'max', 'min', 'mean'}, optional) – Flag determining wether to use maximum, minimum or mean of a variable from all timeframes the cell covers. Default is ‘max’.

  • axes (matplotlib.axes.Axes, optional) – Matplotlib axes to plot on. Default is None.

  • density (bool, optional) – If False, the result will contain the number of samples in each bin. If True, the result is the value of the probability density function at the bin, normalized such that the integral over the range is 1. Default is False.

  • **kwargs

Returns:

plot_hist – List containing the matplotlib.lines.Line2D instance of the histogram

Return type:

list