On Friday 12 February 2010 17:04:27 Yagua Rovi wrote:
> Hello world!
> I am displaying on my screen a set of data corresponding to points
> defined by a longitude and latitude.
> The display is fine with the command imshow (mydata ,...)
> I would like now associate to the application a callback that draw a
> rectangle on two consecutive left mouse's button press defined by its two
> opposite vertices.
> (also returns points) and a right click button that erases the rectangle.
Why don't you want for select the rectangle using the rectangle selector?
I attached an example (modified version of example 'rectangle_selector.py')
showing its usage. You can delete lines using the key 'd' or 'D'.
Furthermore I attached a script, which uses button_press_event s as you
I hope at least one of the examples helps you.