diff --git a/script/local.py b/script/local.py index fec92b7..78418ff 100755 --- a/script/local.py +++ b/script/local.py @@ -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]