32 lines
610 B
Python
32 lines
610 B
Python
import random
|
|
|
|
title = "test"
|
|
p = None
|
|
def add_plot(x,y, name=None):
|
|
global title
|
|
global p
|
|
plots = get_plots(title = title)
|
|
if len(plots)==0:
|
|
p = plot(None,name="Data 1")[0]
|
|
p.setLegendVisible(True)
|
|
else:
|
|
p = plots[0]
|
|
p.addSeries(LinePlotSeries(name))
|
|
s = p.getSeries(name)
|
|
s.setData(x, y)
|
|
|
|
|
|
|
|
|
|
x=[]
|
|
y=[]
|
|
|
|
for step in range(1,2):
|
|
x=[]
|
|
y=[]
|
|
for i in range(100):
|
|
x.append(random.random() * 100 / step)
|
|
y.append(random.random() * 100/ step)
|
|
add_plot (x,y,"Step " + str(step))
|
|
|