Re: how to change the page size of pdf?

From: Verica Savic-Jovcic <verica_at_nyahnyahspammersnyahnyah>
Date: Sun, 18 Mar 2007 11:10:10 -0700

Hi,

One thing you can do is to set gsnMaximize resource to True to
maximize usage of the paper area. If you still don't like the figure,
you can make epsi file in ncl instead of pdf and then use simple UNIX
commands to transfer it to pdf that has no white around. The way I
deal with that problem is to add at the end of the script couple of
system calls, like:

wks = gsn_open_wks("epsi", "test")

...
...
...

system("eps2eps test.epsi test.eps")
system("epstopdf test.eps")
system("rm test.eps*")

Verica

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.atmos.ucla.edu/~verica/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"The art of being wise is the art of knowing what to overlook."
                                                 William James

On Mar 17, 2007, at 11:25 PM, 谢歆 wrote:

> hi,
>
> I need to make a 1x2 panel plot and insert the plot into my
> LaTeX file using a "landscape" orientation. Obviously, a 1x2 panel
> plot
> will not fit in an A4 paper (the 1x2 plot is quite short. There is
> too much
> blank above and below the plot).
>
> So I want to change the page size of the output PDF to fit a 1x2 panel
> correctly. However, there is no change in the output.
> My corresponding codes are as follows:
>
> ...
> ...
> ...
> wks = gsn_open_wks("pdf", "test")
>
> res_at_gsnDraw = False
> res_at_gsnFrame = False
>
> plot1 = gsn_csm_contour_map(wks, T(1,:,:),res)
> plot2 = gsn_csm_contour_map(wks, T(2,:,:),res)
>
> a4_height = 29.7
> a4_width = 10 ; make it a little narrow
> cm_per_inch = 2.54
> panelres = True
> panelres_at_gsnPaperWidth = a4_width/cm_per_inch
> panelres_at_gsnPaperHeight = a4_height/cm_per_inch
> panelres_at_gsneaperMargin = 0.1
> panelres_at_gsnMaximize = True
> panelres_at_gsnPaperOrientation = "landscape"
> gsn_panel(wks, (/plot1, plot2/),(/1,2/), panelres)
> ...
>
> The PDF has been created but when I browse it with Acrobat Reader,
> the page is still a 21cmx27cm one. And there is still too much
> blank in either vertical side.
>
> I think this should be a common problem when one try
> to insert NCL plot into a document (ie TeX one)
> Can this page size be changed?
>
> Thank you very much!
>
> Xie Xin
>
> 申请Gmail博客,赢取精美礼品!
> 详情 请访问Gmail.cn首页
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Mar 18 2007 - 12:10:10 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 19 2007 - 08:45:25 MDT