John Hunter wrote: > On Sun, Jun 15, 2008 at 7:48 AM, sidimok <[EMAIL PROTECTED]> wrote: > >> The code above was working for me as a charm, but since the new matlplotlib >> flavor 0.98, I'm getting this error message: >> >>>> AttributeError: 'CirclePolygon' object has no attribute 'get_verts' << >> Any idea? > > The new patches are more general since they work with general paths > and not just patches, but the snippet below is analogous:: > > verts = [] > for x1,y1,r in zip(x, y, radii): > circle = CirclePolygon((x1,y1), r, resolution) > trans = circle.get_patch_transform() > path = circle.get_path() > transpath = path.transformed(trans) > verts.append(transpath.vertices > > Note when you add the PolyCollection to the Axes, you should be use > ax.add_collection, not ax.add_patch:: > > p = PolyCollection(verts, cmap=matplotlib.cm.jet) > p.set_array(pylab.array(colors)) > ax.add_collection(p) > > But I'm guessing you could use a RegularPolyCollection here anyhow...
Or are you effectively doing a scatter plot? Could you use scatter? Eric > > Michael, do you think it is a good idea to add a get_verts > compatability method to the patches where it makes sense? > > JDH > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users