Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

qt_graph1.py 981 B

123456789101112131415161718192021222324252627282930313233343536
  1. import sys
  2. import time
  3. import numpy as np
  4. import pyqtgraph as pg
  5. from pyqtgraph.Qt import QtCore, QtGui
  6. class App(QtGui.QMainWindow):
  7. def __init__(self, parent=None):
  8. super(App, self).__init__(parent)
  9. #### Create Gui Elements ###########
  10. self.mainbox = QtGui.QWidget()
  11. self.setCentralWidget(self.mainbox)
  12. self.mainbox.setLayout(QtGui.QVBoxLayout())
  13. self.canvas = pg.GraphicsLayoutWidget()
  14. self.mainbox.layout().addWidget(self.canvas)
  15. self.label = QtGui.QLabel()
  16. self.mainbox.layout().addWidget(self.label)
  17. self.view = self.canvas.addViewBox()
  18. self.view.setAspectLocked(True)
  19. self.view.setRange(QtCore.QRectF(0,0, 100, 100))
  20. # image plot
  21. self.img = pg.ImageItem(border='w')
  22. self.view.addItem(self.img)
  23. self.canvas.nextRow()
  24. # line plot
  25. self.otherplot = self.canvas.addPlot()
  26. self.h2 = self.otherplot.plot(pen='y')