仅作为操作记录,大佬请通过。
文章目录
直接上代码,可直接运行
画一图
(第三种方式,其他两种画图方式见博主文章传送门)
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
win = pg.GraphicsLayoutWidget(show=True)
p1 = win.addPlot(y=np.random.normal(size=100))
QtGui.QApplication.instance().exec_()
展示:
画两图
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
win = pg.GraphicsLayoutWidget(show=True)
p1 = win.addPlot(y=np.random.normal(size=100))
p2 = win.addPlot(y=np.random.normal(size=100))
QtGui.QApplication.instance().exec_()
展示:
画三图
用win.nextRow()
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import pyqtgraph as pg
win = pg.GraphicsLayoutWidget(show=True)
p1 = win.addPlot(y=np.random.normal(size=100))
p2 = win.addPlot(y=np.random.normal(size=100))
win.nextRow()
p3 = win.addPlot(y=np.random.normal(size=100))
QtGui.QApplication.instance().exec_()
展示: