I am trying to use matplotlib to display two images and then by mouse click
identify a source in each image. The setup is as follows

    figim = figure(figsize=(8,4))
    axsrc24 = figim.add_subplot(121, xlim=(0,200), ylim=(0,200), autoscale_on=False)
    axsrc24.set_title('Click to zoom')
    axsrc70 = figim.add_subplot(122, xlim=(0,100), ylim=(0,100), autoscale_on=False)
    axsrc70.set_title('Click to zoom')

    def clicker(event):
        if event.inaxes == axsrc24:
            print 'you clicked on the 24 micron image'
        if event.inaxes == axsrc70:
        print 'you clicked on the 70 micron image'
        return
       
    figim.canvas.mpl_connect("button_press_event",clicker)

Now I want to only be able to click each subplot once then lock that subplot
(making it unclickable) and also close the figure when both images have been
clicked on, but I am stuck on implementing this. Anyone have any suggestions. 

I am using the TkAgg interface on a Mac.

Cheers

Tommy

[EMAIL PROTECTED]

http://homepage.mac.com/tgrav/


"Any intelligent fool can make things bigger, 
more complex, and more violent. It takes a 
touch of genious -- and a lot of courage -- 
to move in the opposite direction"
                         -- Albert Einstein


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to