Skip to content

Commit

Permalink
pyqtgraph Test Dateien hizugefügt
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Hadlich committed Jun 30, 2014
1 parent bb3e439 commit 196c4d6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyqtgraph-examples.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import pyqtgraph.examples as ex
ex.run()
28 changes: 28 additions & 0 deletions testpyqtgraph.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"""TestProgramm"""
import numpy as np
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore

app = QtGui.QApplication([])
mw = QtGui.QMainWindow()

layout = pg.GraphicsLayoutWidget()
layout.setBackground(background='w')
mw.setCentralWidget(layout)
mw.show()

p1 = layout.addPlot(title="CPU Usage", row=0, col=0)
x1 = np.arange(100)
y1 = np.random.random(size=100)
curve = p1.plot(fillLevel=0.0, pen='b', brush=(50,50,200,100))
curve.setData(x=x1, y=y1)

p2 = layout.addPlot(title="Network Monitor", row=1, col=0)
x2 = np.arange(100)
y2 = np.random.random(size=100)
curve = p2.plot(fillLevel=0.0, pen='r', brush=(200,50,50,100))
curve.setData(x=x2, y=y2)


if __name__ == '__main__':
QtGui.QApplication.instance().exec_()

0 comments on commit 196c4d6

Please sign in to comment.