Skip to content

Commit

Permalink
Merge pull request #45 from FAST-HEP/BK_fix_stacked_error
Browse files Browse the repository at this point in the history
Fix error on stacked histograms
  • Loading branch information
benkrikler authored Sep 29, 2020
2 parents b0065dd + be35edd commit 0559b1f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.2] - 2020-09-29
### Fixed
- Issue with uncertainty band on stacked plots, PR #45

## [0.8.1] - 2020-06-19
### Fixed
- Allow multiple expansions for KeepSpecificBins in postproc, PR #38
Expand Down
3 changes: 1 addition & 2 deletions fast_plotter/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,13 @@ def plot_1d_many(df, prefix="", data="data", signal=None, dataset_col="dataset",

def _merge_datasets(df, style, dataset_col, param_name="_merge_datasets", err_from_sumw2=False):
if style == "stack":
utils.calculate_error(df, do_rel_err=not err_from_sumw2)
df = utils.stack_datasets(df, dataset_level=dataset_col)
elif style == "sum":
df = utils.sum_over_datasets(df, dataset_level=dataset_col)
utils.calculate_error(df, do_rel_err=not err_from_sumw2)
elif style:
msg = "'{}' must be either 'sum', 'stack' or None. Got {}"
raise RuntimeError(msg.format(param_name, style))
utils.calculate_error(df, do_rel_err=not err_from_sumw2)
return df


Expand Down
2 changes: 1 addition & 1 deletion fast_plotter/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ def split_version(version):
return tuple(result)


__version__ = '0.8.1'
__version__ = '0.8.2'
version_info = split_version(__version__) # noqa
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.8.1
current_version = 0.8.2
commit = True
tag = False

Expand Down

0 comments on commit 0559b1f

Please sign in to comment.