On 07/27/2010 02:31 PM, Phil Rosenfield wrote: > Hi, > > I'm 6 months into learning python and haven't been able to find a way > to do this, so I hope you don't mind a basic question. > > I'd like to use the polygons contour makes but I can't figure out how > to get them from ContourSet. Any examples or links to helpful > information would be excellent.
They are buried. Each contour set has a list of collections, and each of those collections has a set of paths, and each of those paths has a vertices attribute for its corresponding polygon. In the following we will pick out the first path of the first collection. cs = contour(rand(6,6)) c = cs.collections[0] p = c.get_paths()[0] v = p.vertices lev = cs.levels[0] The levels attribute is a list of levels corresponding to the list of collections: one collection per level. Eric > Thanks, > Phil > ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users