(no subject)

From:
Date: Wed Dec 31 1969 - 17:00:00 MST


On Tue, 25 Nov 2003, Mark Stevens wrote:

> Hi Mary,
>
> Attached are 2 plots and a ncl script. The only difference between round.ps
> and oval.ps is that for round.ps the folowing code is commented out, as
>
> ;setvalues wks
> ; "wkDeviceLowerX" : 36
> ; "wkDeviceLowerY" : 36
> ; "wkDeviceUpperX" : 576
> ; "wkDeviceUpperY" : 756
> ;end setvalues
>
> How can I get the above to work to use the full postscript page?
>
> I won't be back until Dec. 1, so I'll talk to you then.
> Thanks
>
> --

Hi Mark,

I've included a sample NCL script (and two data files needed to run
it) that shows how you can take a collection of plots positioned with
viewport coordinates (rather than paneled with gsn_panel), and uses
a function called "compute_ps_device_coords" to calculate the
PS device coordinates for you. The key is to create an array that
will hold all the plots you want to put on the page, and then
you pass the bounding boxes of all these plots to the function.

Once the PS device coordinates have been calculated, you can set them
using "setvalues" like you were doing in your original code, only in
this case you can set them *after* all of your plots have been
created. And, another neat trick is that once you've created an array
of plots, you can say "draw(wks)" and this will draw everything that
was created on that workstation.

I've CC'ed Dennis and Sylvia on this message in case they might benefit
from this example.

--Mary



This archive was generated by hypermail 2b29 : Mon Dec 01 2003 - 08:22:13 MST