From: John H. <jdh...@ac...> - 2006-02-21 14:51:07
|
>>>>> "Julius" == Julius Lucks <jul...@gm...> writes: Julius> my question is what transform do I use to convert verts to Julius> pixel coordinates? ax.get_transform() does not work. Julius> Should I use pl.get_transform? "Does not work" is not very descriptive :-( Yes, you should use the polygon transform You might want to look at the "draw" method of the matplotlib.patches.Polygon class to see how it gets the data into pixel coords verts = self.get_verts() tverts = self._transform.seq_xy_tups(verts) Thus all you need to do outside the class is trans = pl.get_transform() verts = pl.get_verts() tverts = trans.seq_xy_tups(verts) Should work... The documentation for the matplotlib.transforms module is decent, if you want to take a look http://matplotlib.sourceforge.net/matplotlib.transforms.html JDH |