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. JDH ------------------------------------------------------------------------- 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