lasso_demo.py is working again on the trunk. The problem was not transforms related. The problem is in the way the colors were being updated after the markers were selected. On the trunk, the set of facecolors in a collection is stored as a numpy array for efficiency. This meant that the facecolor Python list that lasso_demo.py was updating was no longer the same object as the facecolor Numpy array that was actually used for drawing. I added a get_facecolors() method to Collection, and that is now used to update the colors in the collection.
See r4877 for a set of changes. http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=4877 Cheers, Mike Michael Droettboom wrote: > 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