plot_hist¶
-
sitelle.plot.plot_hist(map, ax=None, log=False, pmin=None, pmax=None, step=True, **kwargs)¶ Helper function to plot an histogram. Especially helpful when dealing with 2d values (map) containing NaN (they are excluded from the analysis)
Parameters: - map (1D or 2D
ndarray) – The data from which the histogram is taken - ax (
Axes) – (Optional) The matplotlib axes on which to plot. If None, a new one will be created. - log –
- pmin (integer between 0 and 100) – (Optional) if passed, vmin set to
np.nanpercentile(data, pmin) - pmax (integer between 0 and 100) – (Optional) if passed, vmax set to
np.nanpercentile(data, pmax) - step (bool, Default = True) – (Optional) If True, displays a step histogram, else a bar histogram.
- label (str) – (Optional) labels of the data, to be displayed in the legend.
- cumulative (bool, Default = False) – (Optional) If True, the culmulative histogram is computed and plotted.
- kwargs (dict) – Additional keyword arguments passed to
numpy.histogram()function
Returns: - map (1D or 2D