![]() |
Belle II Software development
|
Public Member Functions | |
__init__ (self, figure=None, axis=None, normed=False, shift_to_zero=False) | |
add (self, data, column, minuend_mask, subtrahend_mask, weight_column=None, label=None) | |
finish (self, line_color='black') | |
add_subplot (self, gridspecs) | |
save (self, filename) | |
set_plot_options (self, plot_kwargs={ 'linestyle':''}) | |
set_errorbar_options (self, errorbar_kwargs={ 'fmt':'.', 'elinewidth':3, 'alpha':1}) | |
Overrides default errorbar options for datapoint errorbars. | |
set_errorband_options (self, errorband_kwargs={ 'alpha':0.5}) | |
set_fill_options (self, fill_kwargs=None) | |
setAxisLimits (self, factor=0.0) | |
scale_limits (self) | |
Public Attributes | |
normed = normed | |
Minuend and subtrahend are normed before comparing them if this is true. | |
shift_to_zero = shift_to_zero | |
Mean difference is shifted to zero (removes constant offset) if this is true. | |
x_axis_label = column | |
Label on x axis. | |
dpi = dpi | |
set default dpi | |
plot_kwargs = None | |
create figure | |
errorbar_kwargs = None | |
Default keyword arguments for errorbar function. | |
errorband_kwargs = None | |
Default keyword arguments for errorband function. | |
fill_kwargs = None | |
Default keyword arguments for fill_between function. | |
prop_cycler = itertools.cycle(plt.rcParams["axes.prop_cycle"]) | |
Property cycler used to give plots unique colors. | |
Static Public Attributes | |
list | plots = None |
Plots added to the axis so far. | |
list | labels = None |
Labels of the plots added so far. | |
xmin = None | |
Minimum x value. | |
xmax = None | |
Maximum x value. | |
ymin = None | |
Minimum y value. | |
ymax = None | |
Maximum y value. | |
float | yscale = 0.0 |
create figure | |
float | xscale = 0.0 |
create figure | |
figure = None | |
figure which is used to draw | |
axis = None | |
Main axis which is used to draw. | |
Protected Member Functions | |
_plot_datapoints (self, axis, x, y, xerr=None, yerr=None) | |
Plots the difference between two histograms
Definition at line 1078 of file plotting.py.
__init__ | ( | self, | |
figure = None, | |||
axis = None, | |||
normed = False, | |||
shift_to_zero = False ) |
Creates a new figure and axis if None is given, sets the default plot parameters @param figure default draw figure which is used @param axis default draw axis which is used @param normed normalize minuend and subtrahend before comparing them @param shift_to_zero mean difference is shifted to zero, to remove constant offset due to e.g. different sample sizes
Definition at line 1095 of file plotting.py.
|
protectedinherited |
Plot the given datapoints, with plot, errorbar and make a errorband with fill_between @param x coordinates of the data points @param y coordinates of the data points @param xerr symmetric error on x data points @param yerr symmetric error on y data points
Definition at line 184 of file plotting.py.
add | ( | self, | |
data, | |||
column, | |||
minuend_mask, | |||
subtrahend_mask, | |||
weight_column = None, | |||
label = None ) |
Add a new difference plot @param data pandas.DataFrame containing all data @param column which is used to calculate distribution histogram @param minuend_mask boolean numpy.array defining which events are for the minuend histogram @param subtrahend_mask boolean numpy.array defining which events are for the subtrahend histogram @param weight_column column in data containing the weights for each event @param label label for the legend if None, the column name is used
Reimplemented from Plotter.
Definition at line 1113 of file plotting.py.
|
inherited |
Adds a new subplot to the figure, updates all other axes according to the given gridspec @param gridspecs gridspecs for all axes including the new one
Definition at line 129 of file plotting.py.
finish | ( | self, | |
line_color = 'black' ) |
Sets limits, title, axis-labels and legend of the plot
Reimplemented from Plotter.
Definition at line 1156 of file plotting.py.
|
inherited |
Save the figure into a file @param filename of the file
Definition at line 141 of file plotting.py.
|
inherited |
Scale limits to increase distance to boundaries
Definition at line 281 of file plotting.py.
|
inherited |
Overrides default errorband options for datapoint errorband @param errorbar_kwargs keyword arguments for the fill_between function
Definition at line 168 of file plotting.py.
|
inherited |
Overrides default errorbar options for datapoint errorbars.
Overrides default errorbar options for datapoint errorbars @param errorbar_kwargs keyword arguments for the errorbar function
Definition at line 160 of file plotting.py.
|
inherited |
Overrides default fill_between options for datapoint errorband @param fill_kwargs keyword arguments for the fill_between function
Definition at line 176 of file plotting.py.
|
inherited |
Overrides default plot options for datapoint plot @param plot_kwargs keyword arguments for the plot function
Definition at line 152 of file plotting.py.
|
inherited |
Sets the limits of the axis with an optional expansion factor. Parameters: factor (float): Fraction by which to expand the axis limits beyond the data range.
Definition at line 263 of file plotting.py.
|
staticinherited |
Main axis which is used to draw.
divide figure into subplots
Definition at line 75 of file plotting.py.
|
inherited |
set default dpi
Definition at line 86 of file plotting.py.
|
inherited |
Default keyword arguments for errorband function.
Definition at line 117 of file plotting.py.
|
inherited |
Default keyword arguments for errorbar function.
Definition at line 115 of file plotting.py.
|
staticinherited |
figure which is used to draw
Definition at line 73 of file plotting.py.
|
inherited |
Default keyword arguments for fill_between function.
Definition at line 119 of file plotting.py.
|
staticinherited |
Labels of the plots added so far.
divide figure into subplots
create empty list for plots
create empty list for labels
Definition at line 61 of file plotting.py.
normed = normed |
Minuend and subtrahend are normed before comparing them if this is true.
Definition at line 1104 of file plotting.py.
|
inherited |
create figure
divide figure into subplots
create empty list for plots
create empty list for labels
set x limits
set y limits
y limit scale
x limit scale
Default keyword arguments for plot function
Definition at line 113 of file plotting.py.
|
staticinherited |
Plots added to the axis so far.
divide figure into subplots
create empty list for plots
Definition at line 59 of file plotting.py.
|
inherited |
Property cycler used to give plots unique colors.
Definition at line 127 of file plotting.py.
shift_to_zero = shift_to_zero |
Mean difference is shifted to zero (removes constant offset) if this is true.
Definition at line 1105 of file plotting.py.
x_axis_label = column |
Label on x axis.
Definition at line 1153 of file plotting.py.
|
staticinherited |
Maximum x value.
divide figure into subplots
create empty list for plots
create empty list for labels
set x limits
Definition at line 65 of file plotting.py.
|
staticinherited |
Minimum x value.
create figure
divide figure into subplots
create empty list for plots
create empty list for labels
set x limits
Definition at line 63 of file plotting.py.
|
staticinherited |
create figure
limit scale
divide figure into subplots
create empty list for plots
create empty list for labels
set x limits
set y limits
y limit scale
x limit scale
Definition at line 71 of file plotting.py.
|
staticinherited |
Maximum y value.
divide figure into subplots
create empty list for plots
create empty list for labels
set x limits
set y limits
Definition at line 69 of file plotting.py.
|
staticinherited |
Minimum y value.
create figure
divide figure into subplots
create empty list for plots
create empty list for labels
set x limits
set y limits
Definition at line 67 of file plotting.py.
|
staticinherited |
create figure
limit scale
divide figure into subplots
create empty list for plots
create empty list for labels
set x limits
set y limits
y limit scale
Definition at line 70 of file plotting.py.