Script execution

This commit is contained in:
sfop
2016-06-16 16:56:45 +02:00
parent 74a60efd3f
commit 20782225d1

View File

@@ -1,14 +1,17 @@
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))
p.addSeries(LinePlotSeries(name))
s = p.getSeries(name)
s.setData(x, y)