I am able to create a vertical bar chart using following code:
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
window = pg.plot()
y1 = [5, 5, 7, 10, 3, 8, 9, 1, 6, 2]
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
bargraph = pg.BarGraphItem(x=x, height=y1, width=0.6)
window.addItem(bargraph)
Result:
But now i need to plot a horizontal bar chart:
How can i do this using pyqtgraph?


