PlotView: more than one plotdata

The following code will result in the image above

pv = gui.CreatePlotView()

"""
A 0 or 1 as the second parameter of plotdata will determine
wheter a datapoint will be drawn as a circle or a square.
The shape is the same for all datapoints in the plotdata.
"""
d = gui.PlotData(0,0,0)
d2 = gui.PlotData(0,1,0)

d.AddXY(0.0,0.0)
d.AddXY(1.0,1.0)
d2.AddXY(2.0,2.0)
d2.AddXY(3.0,3.0)

pv.AddData(d)
pv.AddData(d2)

back to PlotView

Attachments