import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
import numpy as np
import time
window = pg.plot()
window.setGeometry(100, 100, 600, 500)
title = "GeeksforGeeks PyQtGraph"
window.setWindowTitle(title)
y1 = [5, 5, 7, 10, 3, 8, 9, 1, 6, 2]
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
bargraph1 = pg.BarGraphItem(x = x, height = y1, width = 0.6, brush ='g')
window.addItem(bargraph1)
window.setMaximumWidth(600)
value = window.maximumWidth()
print("Max Width : ", end ="")
print(value)
if __name__ == '__main__':
import sys
if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
QtGui.QApplication.instance().exec_()