Re: how to change the page size of pdf?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 27 Mar 2007 13:48:35 -0600 (MDT)

Xie Xin,

Just FYI: we're going to look at the internal script that
computes these coordinates to see if there's a problem.

Meanwhile, can you send me your modified script and your new PS
file?

Thanks,

--Mary

On Tue, 27 Mar 2007, Mary Haley wrote:

>
> Xie Xin,
>
> It sounds like the code for trying to maximize your output on your
> odd-size paper is not working properly. I will have to look into
> this sometime, but right now am extremely busy.
>
> To work around this, I suggest looking at the resources:
>
> wkDeviceLowerX
> wkDeviceLowerY
> wkDeviceUpperX
> wkDeviceUpperY
>
> The first one is documented at:
>
> http://www.ncl.ucar.edu/Document/Graphics/Resources/wk.shtml#wkDeviceLowerX
>
> In this documentation there's a pointer to another document that talks
> about how to set these four resources so you can position your plots
> correctly for a PS or PDF output device.
>
> If you use this method, then you should *not* use the
> "maximize_output" procedure that was in the script I sent you.
> Instead, these four resources should be set after you open a
> workstation:
>
> wks = gsn_open_wks("ps","file")
>
> setvalues wks
> "wkDeviceLowerX" : 50
> "wkDeviceLowerY" : 50
> "wkDeviceUpperX" : 50
> "wkDeviceUpperY" : 50
> end setvalues
>
> Note that "50" is just some placeholder value; you will need to figure
> out what values to use.
>
> I'm certainly no expert in this area. I think that Fred Clare might
> be able to help you more here.
>
> --Mary
>
> On Wed, 28 Mar 2007 xiexin163_at_zju.edu.cn wrote:
>
>>
>> Hi, Mary
>>
>> Using your sciprt, now I can change the position of the plot
>> following the code your sent me adjusting the value of vpXF and vp YF.
>> But I still can not change the paper size.
>> I draw the problem in the attachment in a PDF file and wonder
>> how to make the page size fit the plot.
>> Thank you very much!
>>
>> Xie Xin
>>
>>
>> In your mail:
>>> From: Mary Haley <haley_at_ucar.edu>
>>> Reply-To:
>>> To: xiexin163_at_zju.edu.cn
>>> Subject: Re: how to change the page size of pdf?
>>> Date:Mon, 26 Mar 2007 09:24:21 -0600
>>>
>>>
>>> Xie Xin,
>>>
>>> I have modified your code to use vp* resources to position and resize
>>> your plots, rather than using gsn_panel to panel your plots. This is
>>> necessary since your plots are different sizes.
>>>
>>> In order to get some good vp* values to start with however, I went
>>> and ahead and called gsn_panel with the additional resource
>>> "panelres_at_gsnPanelDebug = True". This echos the X and Y position for
>>> each plot, as well as the height and width. From this, I can find
>>> some nice values to start with for vpXF, vpYF, vpHeightF, and vpWidthF.
>>>
>>> I then increased the width and height of each plot the same amount by
>>> applying a small scale factor to the vpWidthF/vpHeightF values. I
>>> also adjusted the vpXF position for the second plot slightly.
>>>
>>> Finally, to maximize all of this, I called an (as yet) undocumented
>>> procedure "maximize_output".
>>>
>>> Please give this new script a try. You may want to tweak the vp* and/
>>> or scale values yourself.
>>>
>>> Good luck,
>>> --Mary
>>>
>>> On Mar 24, 2007, at 8:41 AM, xiexin163_at_zju.edu.cn wrote:
>>>
>>
>>
>>
> _______________________________________________
> 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 Tue Mar 27 2007 - 13:48:35 MDT

This archive was generated by hypermail 2.2.0 : Sun Apr 01 2007 - 11:55:28 MDT