Verified Commit 5e82d648 authored by Frank Sauerburger's avatar Frank Sauerburger
Browse files

Replace figure/axes with new figure_size argument

parent 7db73cad
Pipeline #2461219 failed with stages
in 9 minutes and 5 seconds
......@@ -65,7 +65,7 @@ class HistogramFactory:
return hist(*self.args, *args, **dict(self.kwds, **kwds))
def hist(dataframe, variable, bins, stacks, selection=None,
range=None, blind=None, axes=None, figure=None,
range=None, blind=None, figure_size=None,
weight=None, y_log=False, y_min=None, vlines=[],
denominator=0, numerator=-1, ratio_label=None, diff=False,
ratio_range=None, atlas=None, info=None, enlarge=1.6,
......@@ -89,10 +89,9 @@ def hist(dataframe, variable, bins, stacks, selection=None,
argument can be a single stack, a list of stacks or None. By default,
no stack is blinded.
If the figure argument is omitted, this method creates a new axes and
figure. If axes only is omitted, the method creates a new axes from the
figure. If a ratio plot is drawn, axes must a list if main, ratio plot if
not omitted.
This method creates a new figure and axes internally (handled by uhepp).
The figure size can be changed with the figure_size argument. If this
argument is not None, it must be a tuple of (width, height).
The method returns (figure, axes) which were used during plotting. This
might be identical to the figure and axes arguments. If a ratio plot is
......@@ -342,6 +341,9 @@ def hist(dataframe, variable, bins, stacks, selection=None,
pos_x = vline.pop("x")
uhepp_obj.v_lines.append(uhepp.VLine(pos_x, **vline))
if figure_size is not None:
uhepp_obj.figure_size = figure_size
if return_uhepp:
return uhepp_obj
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment