dataset¶
This module provides the Dataset class.
-
class
mATLASplotlib.converters.dataset.Dataset(*args, **kwargs)¶ Bases:
objectContainer for plottable datasets.
-
__init__(*args, **kwargs)¶ Constructor - specify values and error pair separately for each dimension.
Arguments will be interpreted as the dataset to be plotted.
Examples: - x vs y : __init__([1,2,3], [4,9,16])
- x vs y with y_errors : __init__([1,2,3], None, [4,9,16], [2,3,4])
- z values at each (x, y) point : __init__([1, 2], [3, 4], [3, 4, 6, 8])
Positional Arguments: - args: (ROOT.TObject, iterable, numpy array) – plottable information which is used to build a
Dataset
Keyword Arguments: - x_values: (iterable) – list of points along the x-axis
- x_error_pairs: (iterable) – list of error pairs along the x-axis
- y_values: (iterable) – list of points along the y-axis
- y_error_pairs: (iterable) – list of error pairs along the y-axis
- z_values: (iterable) – list of points along the z-axis
- z_error_pairs: (iterable) – list of error pairs along the z-axis
Raises: - AssertionError – arguments are not correctly sized
- ValueError – arguments cannot be interpreted
-
construct_2D_bin_list(axes='xy')¶ Construct full set of bins when treating x and y as two sides of a 2D plot.
Returns: array of x and y bin centers that cover every (x, y) combination Return type: [np.array, np.array] Raises: ValueError – unsupported axes argument
-
get_dimensions()¶ Get a list of dimension names.
Returns: list of dimension names Return type: list(str)
-