Script execution

This commit is contained in:
sfop
2016-06-21 11:24:36 +02:00
parent 49899d4268
commit a7e7b5591f

View File

@@ -155,13 +155,15 @@ def clear_convex_hull_plot(title):
if len(plots)>0:
plots[0].clear()
def add_convex_hull_plot(title, x,y, name=None, clear = False):
def add_convex_hull_plot(title, x,y, name=None, clear = False, x_range = None, y_range = None):
plots = get_plots(title = title)
p = None
if len(plots)==0:
p = plot(None,name=name, title = title)[0]
p.getAxis(p.AxisId.X).setRange(-50,150)
p.getAxis(p.AxisId.Y).setRange(-50,150)
if x_range is not None:
p.getAxis(p.AxisId.X).setRange(x_range[0], x_range[1])
if y_range is not None:
p.getAxis(p.AxisId.Y).setRange(y_range[0], y_range[1])
p.setLegendVisible(True)
else:
p = plots[0]