John Hunter wrote: > On Jan 4, 2008 4:33 PM, Mephisto <[EMAIL PROTECTED]> wrote: >> 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. > > matplotlib implements these algorithms in C -- see > matplotlib.nxutils.pnpoly for a testing inclusion of a single point, > and matplotlib.nxutils.points_inside_poly for testing multiple points. > There is some example code using the latter function at > http://matplotlib.sf.net/examples/lasso_demo.py. Not sure why this > example is not working for Venkat.
This is probably not the reason for Venkat (I think he said he was using 0.87)... but lasso_demo.py is currently broken on the trunk, and working for me in 0.91.2. I'm looking into it. Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------- 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