1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-09 18:27:52 +01:00

refactor: added example usage within main statement

This commit is contained in:
2023-07-13 18:32:10 +02:00
parent 1c237f4bf8
commit 4ee18ac3af

View File

@@ -1,9 +1,8 @@
import itertools
import pyqtgraph as pg
from PyQt5.QtCore import pyqtProperty, pyqtSlot
from bec_lib.core.logger import bec_logger
from PyQt5.QtCore import pyqtProperty, pyqtSlot
logger = bec_logger.logger
@@ -104,3 +103,19 @@ class BECScanPlot(pg.PlotWidget):
@x_channel.setter
def x_channel(self, new_val):
self._x_channel = new_val
if __name__ == "__main__":
import sys
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
plot = BECScanPlot()
plot.y_channel_list = ["a", "b", "c"]
plot.initialize()
plot.show()
sys.exit(app.exec_())