Script execution
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user