Hello everyone, although I thought this topic had been discussed earlier I wasn't able to find it in the archives. So please forgive me if I'm repeating something. Here the question I'm not able to answer on my own:
Is there a possibility to disconnect an event when someone wants to use the zoom-to-rectangle mechanism so that the code which originally would be executed on the event isn't actually executed as long as the zooming is activated? To have an example to talk about: ############ from pylab import * def click(event): """If the left mouse button is pressed: draw a little square. """ if event.button==1 and event.inaxes: x,y = event.xdata,event.ydata plot([x],[y],'rs') draw() plot((arange(100)/99.0)**3) gca().set_autoscale_on(False) connect('button_press_event',click) show() ############ If one runs this script and tries to use the zooming he will always add such a little red square to the plot. Can this be prevented somehow? Thanks for your help, Martin ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users