Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!s31g2000yqs.googlegroups.com!not-for-mail
From: roger <northsolomonsea@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Poor quality when saving figures as images
Date: Fri, 6 Nov 2009 03:10:55 -0800 (PST)
Organization: http://groups.google.com
Lines: 27
Message-ID: <485407d7-979e-41dc-a5d8-284d2a2664c6@s31g2000yqs.googlegroups.com>
References: <hd00t3$o98$1@fred.mathworks.com>
NNTP-Posting-Host: 195.193.213.214
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1257505855 9264 127.0.0.1 (6 Nov 2009 11:10:55 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 6 Nov 2009 11:10:55 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: s31g2000yqs.googlegroups.com; posting-host=195.193.213.214; 
	posting-account=BbKioQoAAAAt_SMfLTBT5PYUV9nQycia
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; 
	InfoPath.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; 
	.NET CLR 3.5.21022),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:582979


On Nov 6, 3:16 am, "Brad " <wooleverbr...@johndeere.com> wrote:
> I have a routine that processes some data and creates figures as it goes, and I want to know how to programatically save the figures as images, and get the exact same results as I would get via the File > Save As... menu dialog from the figure window.
>
> Currently, if I save a figure through the File > Save As... menu, I'm happy with the way it looks (just like it looks on screen).  But if I try to programatically save the same figures using saveas or print like below, they look bad in my opinion.  I lose the background color I specified, the aspect ratio isn't what I specified, the font size is huge, etc.
>
> saveas(gcf,path,'png');  
> -OR-
> print(gcf,'-dpng',path);
>
> How can I avoid the ugly "default" look and get the same results as when manually saving via the menu?
>
> Thanks!

try playing with the papertype, papersize, paperposition etc.
properties of the figure, these will allow you to control the size of
the printed image. There is a print option that lets you choose
whether to include the background colors or not, i forgot what it is
called but it should be in the print documentation.