help-octave
[Top][All Lists]
Advanced

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

Re: pdf page layout


From: Ben Abbott
Subject: Re: pdf page layout
Date: Sat, 02 Mar 2013 10:53:24 -0500

On Mar 2, 2013, at 10:41 AM, marciobarbalho wrote:

> Hi all
> 
> I've been plotting really beautiful graphs with octave for my thesis... and
> I noticed the best image format is 'pdf' because I am using
> LaTex/MikTeX/Windows8. PNG doesn't work well because it is not vectorial,
> EPS won't work with pdflatex, so... my alternatives are:
> 1) export the graph to pdf from octave.
> 2) export to graph to EMF from gnuplot and convert it to PDF. (not very much
> handy because i have to save the dat and load it from gnuplot + a third
> party program to make the conversion)
> 
> My question is: Is there a way of making the page layout fit the graph in
> the PDF format? I noticed a huge space between the picture and its label in
> the latex final document.
> 
> example:
> Octave> print -dpdf sombrero.pdf
> 
> Very much appreciated
> 
> Márcio

Octave's pdf output size is controlled by the figure's "papersize" property.  
Meaning pdf output is a full page.  The placement of the figure on the page is 
controlled by the "paperposition" property.  If you just want a figure then you 
can either (1) adjust the figure's "papersize" and "paperpostion" properties, 
or (2) If you are using Octave 3.6.x, try using the pdfwrite device.

(1) To adjust the figure properties ...

        close all
        figure (1)
        set (gcf, "papersize", [6, 4], "paperposition", [0 0 6 4])
        plot (rand (3))
        print test1.pdf

(2) Use pdfwrite

        close all
        figure (1)
        plot (rand (3))
        set (gcf, "paperposition", [1.25 3.5 0 6 4])
        print -dpdfwrite test2.pdf

Ben



reply via email to

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