pyqtgraph--用PlotWidget绘制图形
import pyqtgraph as pg import numpy as np app = pg.QtGui.QApplication([]) pw = pg.PlotWidget(title="绘图") #创建一个绘图控件 pw.resize(600, 300) data = np.random.random(size=50) pw.plot(data) #在绘图控件中绘制图形 pw.show() #显示绘图控件 app.exec_()