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:
@@ -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_())
|
||||
|
||||
Reference in New Issue
Block a user