|
From: John H. <jd...@gm...> - 2009-05-19 14:51:18
|
On Tue, May 19, 2009 at 3:57 AM, Thomas Pfaff <ya...@gm...> wrote: > Hi all, > > > > Is there a way to completely turn of anti-aliasing when saving to png? > > > > I want to put graphs into a PowerPoint Presentation but there, anti-aliased > png-graphics look blurry. > > I found how to turn anti-aliasing off for lines, but texts and axes are > still anti-aliased. > > Is there a way to do that? You could use the findobj function to recursively find any object in the figure with an "antialiased" method (though the Text objects do not currently have such a method). This would at least get you the lines, rectangles and polygons http://matplotlib.sourceforge.net/examples/pylab_examples/findobj_demo.html http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.artist.Artist.findobj Eg:: def has_aa(x): return hasattr(x, 'set_antialiased') for o in fig.findobj(has_aa): o.set_antialiased(False) JDH |