views:

105

answers:

1

(I am new to GUI programming; experienced programmer otherwise)

(Using wxPython; but generic advice welcome)

I am looking for advice / direction on implementing a widget that can do area selection on a plot. Any pointers from experienced users would be much appreciated.

What needs to be done is:

  1. Implement a two dimensional plot.
  2. Implement a resizeable square that can be moved around to select an area on the plot.
  3. Report the plot points that fall within that area.

I realize that given the coordinates of the square and a sorted list of plot points, the contained plot points are easy to compute. I am just not sure of the widgets / graphics techniques to use to implement the plot itself and the resizeable square.

Thanks for any help!

+1  A: 

For points 1 and 2 you could try WxMpl :

http://agni.phys.iit.edu/~kmcivor/wxmpl/

It's a module for matplolib embedding in wxPython. Zooming in/out works out of the box.

Rohiero