MVHistogram.from_data (method)
def from_data(cls, data, bins=10, range=None, weights=None, units=None, labels=None, labels_latex=None, wrap_ats=None)
Create a MVHistogram from data.
Arguments
data
(array): input array of samples. Passed to np.histogramddbins
(integer or array, optional, default=10): number of bins or bin edges. Passed to np.histogramddweights
(array, optional, default=None): weights for each entry indata
. Passed to np.histogramddunits
(list of astropy.units objects, optional): the units of the provided values.labels
(list of strings, optional): labels for each dimension in the distribution. This is used for the x-labels while plotting the distribution whenlabels_latex
is not provided, as well as a shorthand notation when creating a Composite distribution.labels_latex
(list of strings, optional): latex labels for each dimension in the distribution. This is used for plotting the distribution.wrap_ats
(list of floats, None, or False, optional, default=None): values to use for wrapping. If None andunit
are angles, will default to 2*pi (or 360 degrees). If None andunit
are cycles, will default to 1.0.
Returns
- a MVHistogram object