[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print PDF correctly

From: Ben Abbott
Subject: Re: Print PDF correctly
Date: Wed, 03 Feb 2010 19:22:33 -0500

On Feb 3, 2010, at 6:47 PM, lixo1 wrote:

> Ben Abbott wrote:
>> On Feb 2, 2010, at 12:23 PM, lixo1 wrote:
>>> Dear all,
>>> I'm using Octave 3.2.3 on Win7.
>>> I'm tryng to understand how to save a plot in the PDF format or PS
>>> correctly, that means: only the graphic in the page, I don't want a white
>>> A4
>>> paper with a graph in the corner.
>>> I tried to use different things that really don't get a good result.
>>> Please can you show me the correct way to create good, well sized pdf
>>> files?
>>> Thank you very much for all help.
>> Try changing your figure's "papersize" and "papersposition" properties to
>> modify the size of the printed output and to change the position of the
>> graphic on the page.
>> If you can tell us more clearly what you'd like to see, I can give you the
>> commands needed to do that.
>> Ben
> Thank you very much for your answer.
> More clearly I would like to print my plot in a A4 dimension (something like
> 21x30cm) in landscape position.
> Thank you very much another time.

Once the proper listeners are in place changing the paperunits and papertype 
will make this more convenient.

Presently, the following commands should do what you want.

        set (gcf, "paperorientation", "landscape")
        papersize = [30, 21]/2.54;
        set (gcf, "papersize", papersize)
        set (gcf, "paperposition", [0.25 0.25, papersize-0.5])

The last command places a 0.25in margin around the page. 

If you'd like to change the defaults for the current Octave session by ...

        set (0, "defaultfigurepaperorientation", "landscape")
        papersize = [30, 21]/2.54;
        set (0, "defaultfigurepapersize", papersize)
        set (0, "defaultfigurepaperposition", [0.25 0.25, papersize-0.5])

If you place those in our ~/.octaverc file then the defaults can be changed for 
future Octave sessions as well.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]