data_plotting_arrays¶
-
minkit.
data_plotting_arrays
(data, **kwargs)[source]¶ Get the values from a data sample for plotting. The possibilities for kwargs differ from the binned and unbinned cases:
Unbinned
bins (int or tuple(int, …)): number of bins per dimension of data.
projection (str): project the output data in the given dimension.
sw2 (bool): if the sample has weights and is set to True, return also the errors calculated as the square root of the sum of weights per bin: \(\sigma_j = \sqrt{\sum_i^n (\omega_j^i)^2}\)
Binned
rebin (int or tuple(int, …)): change the bins by mergin rebin bins together.
projection (str): project the output data in the given dimension.
- Parameters
data (DataSet or BinnedDataSet) – data sample.
kwargs (dict) – keyword arguments.
- Returns
In the unbinned case, the values, list of edges, and the errors if sw2 is set to True. In the binned case, the values and the list of edges. If the has only one dimension, the edges are returned as a single array.
- Return type
numpy.ndarray, (numpy.ndarray or list(numpy.ndarray)), (numpy.ndarray)