Re: how to change the page size of pdf?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 19 Mar 2007 07:46:41 -0600 (MDT)

Hi,

I believe that setting gsnPaperMargin is the easiest way you can get
rid of white space, but it obviously doesn't get rid of all of it.

It can sometimes depend on the type of visualizations you are
doing, and whether you are paneling plots. If you are doing paneling,
then there's a couple of panel resources you can use
(gsnPanelXWhiteSpacePercent and gsnPanelYWhiteSpacePercent) to control
white space.

The other thing that might work to trim white space is to use the
"-trim" option with the ImageMagick tool "convert"
(http://www.imagemagick.org/script/index.php). I use this tool to
convert my PS/PDF files to png *and* to trim the white space for usage
on web pages and PowerPoint presentations.

If you are able to provide us with your data and script, we can try
running it here and suggest ways to decrease the white space.

--Mary

On Mon, 19 Mar 2007 xiexin163_at_zju.edu.cn wrote:

>
> Hi,
>
> Thank you for Verica and Louis ' help.
> I think gsnPaperMargin as small as possible possibly can
> get rid of the white space. So I change it to 0.1 here.
> However it still doesn't work. Finally, Verica's way works fine, which
> depends on the eps2eps and epstopdf tools. These two tools
> clean all the white space around the plot
> (which is convenient to insert in to a TeX document).
>
> But is there a internal NCL way to do that?
>
> Thank you very much!
>
>> 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
>
>
> _______________________________________________
> 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 Mon Mar 19 2007 - 07:46:41 MDT

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