Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: output a pdf
Date: Tue, 25 Mar 2008 14:45:35 -0400
Organization: The MathWorks
Lines: 32
Message-ID: <fsbh8f$ofg$1@fred.mathworks.com>
References: <fsbe43$h6g$1@fred.mathworks.com> <fsbesg$qlp$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: quistr.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1206470735 25072 144.212.107.174 (25 Mar 2008 18:45:35 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 25 Mar 2008 18:45:35 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
In-Reply-To: <HIDDEN>
Xref: news.mathworks.com comp.soft-sys.matlab:459122



David Doria wrote:
> I found "File - Export Setup" - it let me change the width
> to 5 inches , which fixed the inital problem.  However, I am
> trying to put this figure into a latex document, and it
> seems matlab has added white space to fill up an 8.5x11
> piece of paper instead of just using the 5" that I
> specified.  Is there a way to prevent this?
> 
> Thanks,
> 
> David

Something along this line may do the trick - assuming you want to the 
output to be 5x5, set both the papersize AND the paperposition 
properties on the figure:

   set(gcf, 'papersize', [5 5]);
   set(gcf, 'paperposition', [0 0 5 5]);
   print -dpdf test5x5.pdf

There's also my fillPage File Exchange submission 
(http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=16566&objectType=FILE) 
that helps with this kind of operation:
   oldSettings = fillpage(gcf, 'margins', [0 0 0 0], 'papersize', [5 5]);
   print -dpdf test5x5.pdf
   set(gcf, oldSettings); % restore previous settings

-- 

Richard Quist
Software Developer
The MathWorks, Inc.