comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL 8.0.1 pdf
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL 8.0.1 pdf [message #73412] Tue, 09 November 2010 08:34 Go to next message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
Hi all,

I'm saving a number of NG plots into a multi-page pdf. I have six
plots of lightcurves per landscape page, using the layout=[2,3,...]
and /current keywords, but no matter how much I play with the height,
width, page_size, and dimensions keywords, I can't get the plots to
take up the whole page. They are small and centered with a huge (like
3 inch) margin on each side. If I set xmargin and ymargin, the
graphic is moved to a different part of the page but is just as small.

Can anyone tell me how to make a pdf take up more of the page in IDL
8.0.1?

--Gray

Code:

PRO plot_lightcurves, time, curves
;ncurve = (size(curves,/dim))[0]
ncurve = 12
last = ncurve - 1
for i=0,last,6 do begin
p0 = errorplot(time,curves[i,0,*],curves[i,1,*],'D-',$
sym_filled=1,layout=[2,3,1],dimensions=[1000,600],/buffer)
if (i eq last) then goto, done
p1 = errorplot(time,curves[i+1,0,*],curves[i+1,1,*],'D-',$
sym_filled=1,layout=[2,3,2],/current)
if (i+1 eq last) then goto, done
p2 = errorplot(time,curves[i+2,0,*],curves[i+2,1,*],'D-',$
sym_filled=1,layout=[2,3,3],/current)
if (i+2 eq last) then goto, done
p3 = errorplot(time,curves[i+3,0,*],curves[i+3,1,*],'D-',$
sym_filled=1,layout=[2,3,4],/current)
if (i+3 eq last) then goto, done
p4 = errorplot(time,curves[i+4,0,*],curves[i+4,1,*],'D-',$
sym_filled=1,layout=[2,3,5],/current)
if (i+4 eq last) then goto, done
p5 = errorplot(time,curves[i+5,0,*],curves[i+5,1,*],'D-',$
sym_filled=1,layout=[2,3,6],/current)
if (i+5 eq last) then goto, done
p0.save, 'lightcurves.pdf',/append,/landscape
p0.close
endfor
done:
p0.save, 'lightcurves.pdf',/append,/close,/landscape
p0.close
end
Re: IDL 8.0.1 pdf [message #73506 is a reply to message #73412] Tue, 09 November 2010 10:08 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Nov 9, 12:59 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Nov 9, 2:34 pm, Gray <grayliketheco...@gmail.com> wrote:
>
>> Hi all,
>
>> I'm saving a number of NG plots into a multi-page pdf.  I have six
>> plots of lightcurves per landscape page, using the layout=[2,3,...]
>> and /current keywords, but no matter how much I play with the height,
>> width, page_size, and dimensions keywords, I can't get the plots to
>> take up the whole page.  They are small and centered with a huge (like
>> 3 inch) margin on each side.  If I set xmargin and ymargin, the
>> graphic is moved to a different part of the page but is just as small.
>
>> Can anyone tell me how to make a pdf take up more of the page in IDL
>> 8.0.1?
>
> I think that you need to set the margins on one corner with xmargin
> and ymargin, and on the other side from the plot aspect ratio, the
> page size and width or height. This gives me a pdf with no borders:
>
> IDL> p=plot(/test,dimensions=[1100,850],position=[0.,0.,1.,1.])
> IDL> p.save,'test.pdf',width=11.,xmargin=0.,ymargin=0.,/landscape

Excellent, Paulo, that worked perfectly. Thank you!
Re: IDL 8.0.1 pdf [message #73507 is a reply to message #73412] Tue, 09 November 2010 09:59 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Nov 9, 2:34 pm, Gray <grayliketheco...@gmail.com> wrote:
> Hi all,
>
> I'm saving a number of NG plots into a multi-page pdf.  I have six
> plots of lightcurves per landscape page, using the layout=[2,3,...]
> and /current keywords, but no matter how much I play with the height,
> width, page_size, and dimensions keywords, I can't get the plots to
> take up the whole page.  They are small and centered with a huge (like
> 3 inch) margin on each side.  If I set xmargin and ymargin, the
> graphic is moved to a different part of the page but is just as small.
>
> Can anyone tell me how to make a pdf take up more of the page in IDL
> 8.0.1?

I think that you need to set the margins on one corner with xmargin
and ymargin, and on the other side from the plot aspect ratio, the
page size and width or height. This gives me a pdf with no borders:

IDL> p=plot(/test,dimensions=[1100,850],position=[0.,0.,1.,1.])
IDL> p.save,'test.pdf',width=11.,xmargin=0.,ymargin=0.,/landscape
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL 8.0.1 pdf
Next Topic: Re: IDL_IDLBridge limited to 4?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 06:26:34 PDT 2025

Total time taken to generate the page: 0.12582 seconds