From ef9871885193ebc562169fac38cb7abdeb7f4ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arthur=20Crippa=20B=C3=BArigo?= Date: Wed, 27 Sep 2017 22:13:59 -0300 Subject: [PATCH] BarGraphItem can plot horizontal bars. Proposed fix to https://github.com/pyqtgraph/pyqtgraph/issues/576 --- pyqtgraph/graphicsItems/BarGraphItem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/graphicsItems/BarGraphItem.py b/pyqtgraph/graphicsItems/BarGraphItem.py index a1d5d029..657222ba 100644 --- a/pyqtgraph/graphicsItems/BarGraphItem.py +++ b/pyqtgraph/graphicsItems/BarGraphItem.py @@ -120,7 +120,7 @@ class BarGraphItem(GraphicsObject): p.setPen(fn.mkPen(pen)) p.setBrush(fn.mkBrush(brush)) - for i in range(len(x0)): + for i in range(len(x0 if not np.isscalar(x0) else y0)): if pens is not None: p.setPen(fn.mkPen(pens[i])) if brushes is not None: