Script execution
This commit is contained in:
28
script/test/MultiplePlot.py
Normal file
28
script/test/MultiplePlot.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import random
|
||||
|
||||
title = "test"
|
||||
def add_plot(x,y, name=None):
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user