BarGraphItem can plot horizontal bars.

Proposed fix to https://github.com/pyqtgraph/pyqtgraph/issues/576
This commit is contained in:
Arthur Crippa Búrigo 2017-09-27 22:13:59 -03:00 committed by GitHub
parent f627a6a447
commit ef98718851

View File

@ -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: