import
pyqtgraph as pg
from
pyqtgraph.Qt
import
QtCore, QtGui
import
numpy as np
import
time
window
=
pg.plot()
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)
value
=
window.viewRect()
print
(
"Boundary Rectangle : "
, end
=
"")
print
(value)
if
__name__
=
=
'__main__'
:
import
sys
if
(sys.flags.interactive !
=
1
)
or
not
hasattr
(QtCore,
'PYQT_VERSION'
):
QtGui.QApplication.instance().exec_()