For some simple but effective Python code you can use to create a mask
similar to that provided by the Matlab roipoly function, see 
http://www.ariel.com.au/a/python-point-int-poly.html
http://www.ariel.com.au/a/python-point-int-poly.html . The code seems to be
quite effective.


Venkat Ramanan wrote:
> 
> Hi,
> 
> I'm looking for something analogous to Matlab's ginput() and roipoly().
> 
> ginput() basically displays a crosshair on the current figure and allows 
> us to select points by clicking on it. It returns the x,y coordinates of 
> the points.
> 
> roipoly() allows us to define a polygon by clicking on the figure and 
> returns a logical matrix, where ones represent the insides of the 
> polygon and zeros outside.
> 
> Any pointers are appreciated.
> 
> I recently found matplotlib and started porting some of my Matlab 
> scripts to it.
> 
> Ubuntu feisty (7.04), matplotlib 0.87.7. I can upgrade though.
> 
> Thanks,
> Venkat.
> 
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cross-hair-and-polygon-drawing-tools.-tp14199642p14626348.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to