Thread Subject: saveas with exact figure dimensions?

Subject: saveas with exact figure dimensions?

From: David Doria

Date: 12 Oct, 2008 21:03:02

Message: 1 of 2

When I use
saveas(gcf, filename.pdf)

it produces a pdf with the figure centered on a 8.5x11 paper.

I have seen these
set(gcf, 'papersize', [width height]);
set(gcf, 'paperposition', [left bottom width height]);

but do you really have to set these manually? It seems like the default should be to save only the image - is there an option I'm not seeing to save only the image with no giant white border?

also, what is the difference between

print('-dpdf', filename);

and

saveas(gcf, filename.pdf)

?

Thanks,
Dave

Subject: saveas with exact figure dimensions?

From: David Doria

Date: 13 Oct, 2008 13:37:01

Message: 2 of 2

I found this:

http://www.mathworks.fr/matlabcentral/fileexchange/loadFile.do?objectId=16179&objectType=file

it pretty much does the trick.

Dave

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com