Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Printing Plots in PDF format
Date: Fri, 25 Jul 2008 18:48:02 +0000 (UTC)
Organization: Santander Investment Securities Inc
Lines: 28
Message-ID: <g6d752$3oa$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1217011682 3850 172.30.248.37 (25 Jul 2008 18:48:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 25 Jul 2008 18:48:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 753791
Xref: news.mathworks.com comp.soft-sys.matlab:481883



Hi, 
Iam trying to create a bunch of plots, and print them to 
pdf file. I am saving all my plots in figs() and if i 
print them one by one into PDF file it works. But i like 
to append them all together into one PDF file. I am unable 
to do this. Any help is appreciated very much. Thanks in 
advance. Best, Naveen

% Print each of the 10 plots in a separate PDF document. 

print(figs(1),'-dpdf','-r600','-painters','test1.pdf')
print(figs(2),'-dpdf','-r600','-painters','test2.pdf')
print(figs(3),'-dpdf','-r600','-painters','test3.pdf')
print(figs(4),'-dpdf','-r600','-painters','test4.pdf')
print(figs(5),'-dpdf','-r600','-painters','test5.pdf')
print(figs(6),'-dpdf','-r600','-painters','test6.pdf')
print(figs(7),'-dpdf','-r600','-painters','test7.pdf')
print(figs(8),'-dpdf','-r600','-painters','test8.pdf')  
print(figs(9),'-dpdf','-r600','-painters','test9.pdf')     
print(figs(10),'-dpdf','-r600','-painters','test10.pdf')  

% Print all the 10 plots into one PDF document. 

print(figs(1),'-dpdf','-r600','-painters','test.pdf');
for i=2:length(figs)
        print(figs(i),'-append','-dpdf','-r600','-
painters','test.pdf');
end