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?
Thanks
Thomas
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
···
On Tue, May 19, 2009 at 3:57 AM, Thomas Pfaff <yael@...361...> 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?
I have had issues with alpha PNGs in PP, but I think if you play with the resolution, you should be able to get something that looks good, and it'll be easier than trying to turn anti-aliasing off everywhere.
http://www.scipy.org/Cookbook/Matplotlib/AdjustingImageSize
-Chris
···
On Tue, May 19, 2009 at 3:57 AM, Thomas Pfaff <yael@...361...> wrote:
I want to put graphs into a PowerPoint Presentation but there, anti-aliased
png-graphics look blurry.
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@...259...