Pyqtgraph,如何在绘制trace时让颜色发生变化。获取plot的时候,请把pen参数也给加上;

Pyqtgraph,如何在绘制trace时让颜色发生变化。获取plot的时候,请把pen参数也给加上;

PlotWidget 颜色、self.TNLPlotWidget.plot(pen=[0, 255, 0])

image-20221013222046299

默认的话,是灰色;

效果如下:

image-20221013222241176

https://pyqtgraph.readthedocs.io/en/latest/api_reference/functions.html#pyqtgraph.mkPen

https://pyqtgraph.readthedocs.io/en/latest/api_reference/functions.html#pyqtgraph.mkColor

https://pyqtgraph.readthedocs.io/en/latest/api_reference/functions.html#pyqtgraph.intColor

通过以上的三个连接,彻底搞懂pyqtgraph里边的颜色系统

posted @ 2022-10-13 22:46  bH1pJ  阅读(52)  评论(0编辑  收藏  举报