from
PyQt5.QtGui
import
*
from
PyQt5.QtCore
import
Qt
import
pyqtgraph as pg
from
pyqtgraph.Qt
import
QtCore, QtGui
import
numpy as np
import
time
window
=
pg.plot()
icon
=
QIcon(
"logo.png"
)
window.setWindowIcon(icon)
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
]
bargraph
=
pg.BarGraphItem(x
=
x, height
=
y1, width
=
0.6
, brush
=
'g'
)
window.addItem(bargraph)
value
=
bargraph.sceneTransform()
print
(
"Scene Transform : "
+
str
(value))
if
__name__
=
=
'__main__'
:
import
sys
if
(sys.flags.interactive !
=
1
)
or
not
hasattr
(QtCore,
'PYQT_VERSION'
):
QtGui.QApplication.instance().exec_()