Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以使用 ArrayToQPath 在 pyqtgraph 中绘制不同颜色的多个通道吗?
path = pg.arrayToQPath(xdata.flatten(), ydata.flatten(), conn.flatten()) item = QtGui.QGraphicsPathItem(path) item.setPen(pg.mkPen('w')) plt.addItem(item)
QGraphicsPathItem仅支持单色绘图,因此很遗憾需要为每种颜色创建一个项目。例如,请参阅examples/MultiPlotSpeedTest.py。
QGraphicsPathItem
examples/MultiPlotSpeedTest.py
如果这对您来说不够快,请考虑使用基于 OpenGL 的 vis。图书馆。VisPy 在examples/demo/gloo/realtime_signals.py.
examples/demo/gloo/realtime_signals.py