Home > bioelectromagnetism > save_pdf.m

save_pdf

PURPOSE ^

save_pdf - Save figure to PDF color file

SYNOPSIS ^

function save_pdf(file,F)

DESCRIPTION ^

 save_pdf - Save figure to PDF color file
 
 Usage: save_pdf(file,F)
 
 'file'    - the string filename
 'F'       - a figure handle, when empty uses 'gcf'
 
 Outputs PDF

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function save_pdf(file,F)
0002 
0003 % save_pdf - Save figure to PDF color file
0004 %
0005 % Usage: save_pdf(file,F)
0006 %
0007 % 'file'    - the string filename
0008 % 'F'       - a figure handle, when empty uses 'gcf'
0009 %
0010 % Outputs PDF
0011 %
0012 
0013 % $Revision: 1.1 $ $Date: 2004/11/12 01:32:35 $
0014 
0015 % Licence:  GNU GPL, no implied or express warranties
0016 % History:  10/2004, Darren.Weber_at_radiology.ucsf.edu
0017 %
0018 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0019 
0020 if exist('F','var'),
0021     if isempty(F), F = gcf; end
0022 else
0023     F = gcf;
0024 end
0025 
0026 if exist('file','var'),
0027     if isempty(file), error('no filename'); end
0028 else
0029     error('no filename');
0030 end
0031 
0032 driver = '-dpdf';
0033 option1 = '-noui';
0034 %option3 = '-zbuffer';
0035 fprintf('saving to:...%s\n',file);
0036 print(F,driver,option1,file);
0037 
0038 return

Generated on Mon 15-Aug-2005 15:36:19 by m2html © 2003