Code covered by the BSD License  

Highlights from
saveaspdf

4.5

4.5 | 2 ratings Rate this file 12 Downloads (last 30 days) File Size: 2.72 KB File ID: #32113

saveaspdf

by

 

Save a figure as a clean pdf file ready for publication.

| Watch this File

File Information
Description

Like Matlab's saveas.m, but better:

   - Print figures as pdf in their correct dimensions (and not on A4 paper like Matlab does).
   - If you prefer, you can specify the size of the printed pdf, independent of its size on screen.
   - Optionally increase line thickness and font size for better readability.
   - Optionally set figure background color to transparent for use in presentations.

Example:

figure('Name','A sine');
plot(sin(linspace(0,2*pi,100)));
saveaspdf; % Saves 'A sine.pdf' on your Desktop

MATLAB release MATLAB 7.12 (R2011a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
04 Feb 2013 Shahab  
14 Jul 2011 Shatrughan

Thanks a millions !! worked perfectly...

14 Jul 2011 Laurent S

@Shatrughan: yes, this is possible using the global SAVEASPDF_PATH (type "help saveaspdf" for more options). For example you can do something like this:

global SAVEASPDF_PATH SAVEASPDF_SCALEFONTSIZE;
SAVEASPDF_PATH = 'C:\';
SAVEASPDF_SCALEFONTSIZE = 3;
plot(sin(linspace(0,2*pi,100)));
saveaspdf('A sine'); % Saves 'A sine.pdf' to C:\

09 Jul 2011 Shatrughan

Hi..

This is really nice and saving beautiful figures..just one comment/question..is it somehow possible to save the figures at a desired location using this?..kindly enlighten me..
thanks..

Contact us