Script execution

This commit is contained in:
sfop
2016-06-16 17:31:45 +02:00
parent 43876d499e
commit f1011f89ee

View File

@@ -12,17 +12,18 @@ def add_plot(x,y, name=None):
p.addSeries(LinePlotSeries(name))
s = p.getSeries(name)
s.setLinesVisible(False)
s.setPointSize(3)
s.setData(x, y)
#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")
p.addSeries(bb)
bb.setColor(s.getColor())
bb = LinePlotSeries(name + " BBox", s.getColor())
p.addSeries(bb)
bb.setLineWidth(2)
bb.setData([x1,x2, x2, x1, x1], [y1, y1, y2, y2, x1])