One PlotDataItem can Cointains Multiple Curves?.

23 views
Skip to first unread message

Rajab Legnain

unread,
Mar 17, 2017, 8:39:48 PM3/17/17
to pyqtgraph
Hello
In pyqtgraph docoment, it says that one plotDataItem object can have multiple curves. I tried to implemented but it did not work.

here is the code 
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui
import numpy as np

pg.setConfigOption('background', 'w')

pg.mkQApp()
pw = pg.PlotWidget()


pw.show()
p1 = pw.plotItem

c = pg.PlotCurveItem([{'x': [1,2,3], 'y': [11,22,33]}, {'x': [1,2,3], 'y': [11,22,33]}])
p1.addItem(c)


if __name__ == '__main__':
import sys
if (sys.flags.interactive != 1) or not hasattr(QtCore, 'PYQT_VERSION'):
QtGui.QApplication.instance().exec_()
Reply all
Reply to author
Forward
0 new messages