|
From: Scott H. <st...@co...> - 2012-07-25 22:45:48
|
Thanks for the response. To be more specific, if I run the modified script in an ipython --pylab terminal: In [1]: %run lasso_demo.py In [2]: The function returns, and the lasso manager is garbage collected as you say. In other words, the plot shows up, but I can't draw a lasso and select points. If I run the script in ipython without the pylab flag it works! Why does enabling --pylab have this effect? Since I use pylab for day-to-day computing I'd like to incorporate some of these widgit tools in interactive sessions, but maybe that's not possible? Thanks, Scott On Jul 25, 2012, at 5:10 PM, Tony Yu wrote: > def run(points): > data = [Datum(*xy) for xy in points] > fig = figure() > ax = fig.add_subplot(111, xlim=(0,1), ylim=(0,1), autoscale_on=False) > lman = LassoManager(ax, data) > show() > > if __name__ == '__main__': > points = rand(100, 2) > run(points) |