From e818bcbfc0d463b94efb10e03e9bd81aec40d0fe Mon Sep 17 00:00:00 2001 From: sfop Date: Thu, 16 Jun 2016 17:33:48 +0200 Subject: [PATCH] Script execution --- script/test/MultiplePlot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/test/MultiplePlot.py b/script/test/MultiplePlot.py index b4cd814..7bc5e36 100644 --- a/script/test/MultiplePlot.py +++ b/script/test/MultiplePlot.py @@ -1,8 +1,7 @@ import random -title = "test" def add_plot(x,y, name=None): - global title + title = "test" plots = get_plots(title = title) if len(plots)==0: p = plot(None,name=name, title = title)[0] @@ -14,14 +13,15 @@ def add_plot(x,y, name=None): s.setLinesVisible(False) s.setPointSize(3) s.setData(x, y) - #p.update(False) + p.update(False) time.sleep(0.001) #So s.getColor() is updated x1,x2,y1,y2 = min(x), max(x), min(y), max(y) - bb = LinePlotSeries(name + " BBox", s.getColor()) + bb = LinePlotSeries(name + " BBox", s.color) p.addSeries(bb) bb.setLineWidth(2) bb.setData([x1,x2, x2, x1, x1], [y1, y1, y2, y2, x1]) + print s.color