Thread Subject: How to I "scale to fit" using print command?

Subject: How to I "scale to fit" using print command?

From: Paul

Date: 9 Feb, 2010 09:00:20

Message: 1 of 4

Hi,

I have a Figure (hf = figure;) with some plots. I want to print it automatically in a pdf file. I manage to do it, but the image is to small (somewhere in the middle a small color spot :) ). I want to scale it, to make as big as possible to fit in an A4-landscape.

I use the following command:

set(gcf, 'PaperType', 'A4', 'PaperOrientation', 'landscape', 'PaperPositionMode', 'auto');
print(hf, '-dpdf', 'test1.pdf');

What do I have to do to resize / scale / make it bigger to fit into my A4 landscape size?

Thanks,
Paul

Subject: How to I "scale to fit" using print command?

From: Pekka Kumpulainen

Date: 9 Feb, 2010 10:09:03

Message: 2 of 4

"Paul " <paul_tutzu@yahoo.com> wrote in message <hkr874$g6e$1@fred.mathworks.com>...
> Hi,
>
> I have a Figure (hf = figure;) with some plots. I want to print it automatically in a pdf file. I manage to do it, but the image is to small (somewhere in the middle a small color spot :) ). I want to scale it, to make as big as possible to fit in an A4-landscape.
>
> I use the following command:
>
> set(gcf, 'PaperType', 'A4', 'PaperOrientation', 'landscape', 'PaperPositionMode', 'auto');
> print(hf, '-dpdf', 'test1.pdf');
>
> What do I have to do to resize / scale / make it bigger to fit into my A4 landscape size?
>
> Thanks,
> Paul

From documentation:
PaperPositionMode auto prints the figure the same size as it appears on the computer screen, centered on the page.
Use manual PaperPositionMode ans set the PaperUnits and Paperposition to what you prefer. For example:
set(gcf,'PaperPositionMode', 'manual', ...
    'PaperUnits','centimeters', ...
    'Paperposition',[1 1 28.7 20])

Subject: How to I "scale to fit" using print command?

From: us

Date: 9 Feb, 2010 10:13:02

Message: 3 of 4

"Paul " <paul_tutzu@yahoo.com> wrote in message <hkr874$g6e$1@fred.mathworks.com>...
> Hi,
>
> I have a Figure (hf = figure;) with some plots. I want to print it automatically in a pdf file. I manage to do it, but the image is to small (somewhere in the middle a small color spot :) ). I want to scale it, to make as big as possible to fit in an A4-landscape.
>
> I use the following command:
>
> set(gcf, 'PaperType', 'A4', 'PaperOrientation', 'landscape', 'PaperPositionMode', 'auto');
> print(hf, '-dpdf', 'test1.pdf');
>
> What do I have to do to resize / scale / make it bigger to fit into my A4 landscape size?
>
> Thanks,
> Paul

what is the position/size of your AXES(?)...
it looks as if they're too small...

     ah=findall(gcf,'type','axes');
     pos=get(ah,'position');
     pos=cat(1,pos{:})

us

Subject: How to I "scale to fit" using print command?

From: Paul

Date: 9 Feb, 2010 10:19:04

Message: 4 of 4

"Pekka Kumpulainen" <pekka.nospam.kumpulainen@tut.please.fi> wrote in message <hkrc7v$15j$1@fred.mathworks.com>...
> "Paul " <paul_tutzu@yahoo.com> wrote in message <hkr874$g6e$1@fred.mathworks.com>...
> > Hi,
> >
> > I have a Figure (hf = figure;) with some plots. I want to print it automatically in a pdf file. I manage to do it, but the image is to small (somewhere in the middle a small color spot :) ). I want to scale it, to make as big as possible to fit in an A4-landscape.
> >
> > I use the following command:
> >
> > set(gcf, 'PaperType', 'A4', 'PaperOrientation', 'landscape', 'PaperPositionMode', 'auto');
> > print(hf, '-dpdf', 'test1.pdf');
> >
> > What do I have to do to resize / scale / make it bigger to fit into my A4 landscape size?
> >
> > Thanks,
> > Paul
>
> From documentation:
> PaperPositionMode auto prints the figure the same size as it appears on the computer screen, centered on the page.
> Use manual PaperPositionMode ans set the PaperUnits and Paperposition to what you prefer. For example:
> set(gcf,'PaperPositionMode', 'manual', ...
> 'PaperUnits','centimeters', ...
> 'Paperposition',[1 1 28.7 20])

Hi Pekka,

Thank you. It works.

Regards,
Paul

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
axes us 9 Feb, 2010 05:14:07
graphics handle us 9 Feb, 2010 05:14:07
code us 9 Feb, 2010 05:14:07
pdf Paul 9 Feb, 2010 04:04:03
scale to fit Paul 9 Feb, 2010 04:04:03
print Paul 9 Feb, 2010 04:04:03
rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com