pip install pyqtgraph import pyqtgraph as pg from pyqtgraph.Qt import QtCore, QtGui app = QtGui.QApplication([]) win.resize(800, 600) win.show() x = [1, 2, 3, 4, 5] y = [1, 4, 9, 16, 25] curve = p.plot(x, y, pen='r') x = [1, 2, 3, 4, 5] y = [1, 4, 9, 16, 25] scatter = pg.ScatterPlotItem() scatter.setData(x=x, y=y) p.addItem(scatter) data = [1, 2, 2, 3, 4, 4, 4, 5, 5, 5, 5] hist = pg.HistogramLUTItem() hist.setImageItem(p) hist.setHistogram(data) x = [1, 2, 3, 4, 5] y = [1, 4, 9, 16, 25] bar = pg.BarGraphItem(x=x, height=y, width=0.6, brush='r') p.addItem(bar)


上一篇:
下一篇:
切换中文