Re: drawNDCgrid changes layout

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Aug 12 2010 - 09:38:05 MDT

Hi Oli,
drawNDCGRid should only be called after you create a plot or call
gsn_panel, otherwise you are correct in that it will modify your
plotting area. Thus, the order should be:

For a single plot:
res = True
...
res@gsnFrame = False
plot = gsn_csm_contour_map(wks,arr,res)
drawNDCGrid(wks)
frame(wks)

For a panel plot:

panres = True
panres@gsnFrame = False
gsn_panel(wks,plot2,(/2,2/),panres)
drawNDCGrid(wks)
frame(wks)

Hope that helps...
Adam

On 08/12/2010 02:01 AM, Oliver.Fuhrer@meteoswiss.ch wrote:
> Dear NCL team,
>
> Here's another question. I open my wks in the following way...
>
> wks_type = "ps"
> wks_type@wkPaperSize = "A4"
> wks_type@wkOrientation = "landscape"
>
> ; zoom NDC coordinates to fill A4 page (keeping aspect ratio 1)
> ; NOTE: use only NDC y-coordinates up to 0.71, otherwise off page
> wks_type@wkDeviceLowerX = 0
> wks_type@wkDeviceUpperX = 842
> wks_type@wkDeviceLowerY = 0
> wks_type@wkDeviceUpperY = 842
>
> wks = gsn_open_wks(wks_type,"./"+filename)
> drawNDCGrid(wks)
>
> Now if I remove the call to drawNDCGrid, my plots looks different and
> the graphics objects move around. Am I doing something wrong?
>
> Cheers,
> Oli
>
>
> ________________________________________
>
> Oliver Fuhrer
> Numerical Models
>
> Federal Departement of Home Affairs FDHA
> Federal Office of Meteorology and Climatology MeteoSwiss
>
> Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland
>
> Tel. +41 44 256 93 59
> Fax +41 44 256 92 78
> oliver.fuhrer@meteoswiss.ch
> www.meteoswiss.ch - First-hand information
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
__________________________________________________
Adam Phillips 
asphilli@ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
Climate and Global Dynamics Division         fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Aug 12 09:38:29 2010

This archive was generated by hypermail 2.1.8 : Fri Aug 13 2010 - 15:05:05 MDT