<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>I am trying to use matplotlib to display two images and then by mouse click</DIV><DIV>identify a source in each image. The setup is as follows</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>    figim = figure(figsize=(8,4))</DIV><DIV>    axsrc24 = figim.add_subplot(121, xlim=(0,200), ylim=(0,200), autoscale_on=False)</DIV><DIV>    axsrc24.set_title('Click to zoom')</DIV><DIV>    axsrc70 = figim.add_subplot(122, xlim=(0,100), ylim=(0,100), autoscale_on=False)</DIV><DIV>    axsrc70.set_title('Click to zoom')</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>    def clicker(event):</DIV><DIV>        if event.inaxes == axsrc24:</DIV><DIV>            print 'you clicked on the 24 micron image'</DIV><DIV>        if event.inaxes == axsrc70:</DIV><DIV>        print 'you clicked on the 70 micron image'</DIV><DIV>        return</DIV><DIV>        </DIV><DIV>    figim.canvas.mpl_connect("button_press_event",clicker)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Now I want to only be able to click each subplot once then lock that subplot</DIV><DIV>(making it unclickable) and also close the figure when both images have been</DIV><DIV>clicked on, but I am stuck on implementing this. Anyone have any suggestions. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am using the TkAgg interface on a Mac.</DIV><DIV><BR class="khtml-block-placeholder"></DIV>Cheers<DIV><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Tommy</FONT></P><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><A href="mailto:tgrav@mac.com">tgrav@mac.com</A></FONT></P><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><A href="http://homepage.mac.com/tgrav/">http://homepage.mac.com/tgrav/</A></FONT></P><BR class="Apple-interchange-newline"></SPAN><DIV>"Any intelligent fool can make things bigger, </DIV><DIV>more complex, and more violent. It takes a </DIV><DIV>touch of genious -- and a lot of courage -- </DIV><DIV>to move in the opposite direction"</DIV><DIV>                         -- Albert Einstein</DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>