diff --git a/.flake8 b/.flake8 index 9e7b0e40..731ae3e7 100644 --- a/.flake8 +++ b/.flake8 @@ -13,4 +13,4 @@ # https://github.com/PyCQA/pycodestyle/issues/386 # W504: Raised by flake8 even when it is followed max-line-length = 88 -ignore = E402 \ No newline at end of file +ignore = E402, W504 \ No newline at end of file diff --git a/mplhep/plot.py b/mplhep/plot.py index 46c9468a..f4135a8b 100644 --- a/mplhep/plot.py +++ b/mplhep/plot.py @@ -63,8 +63,8 @@ def histplot(h, bins, weights=None, yerr=None, _bin_widths = np.diff(bins) if density: - _norm = (np.sum(h, axis=1 if h.ndim > 1 else 0) - / (np.ones_like(h) * _bin_widths).T).T + _norm = (np.sum(h, axis=1 if h.ndim > 1 else 0) / + (np.ones_like(h) * _bin_widths).T).T h = h / _norm if yerr is not None: @@ -150,7 +150,7 @@ def histplot(h, bins, weights=None, yerr=None, _h = h[i] ax.fill_between(bins, _h, step=_where, label=_labels[i], **kwargs) - + elif histtype == 'errorbar': if _nh == 1: ax.errorbar(_bin_centers, h, yerr=_yerr, ls='none',