Re: panel compression

From: Adam Phillips (asphilli AT XXXXXX)
Date: Tue Jun 10 2003 - 16:24:45 MDT


I don't think the problem is being caused by you using vpHeightF or vpWidthF.
If one of your nine plots has a top X-axis, then I think gsn_panel leaves space
for the top x-axis on the other eight plots. I have run into this issue when I
want to use tiMainString on the top plot of my panel, but not on the others. The
only way to get around it that I know of is to just use gsn_text_ndc to add the
text manually to the panel plot before you advance the frame:

map(0) =gsn_csm_xy(wks,tsarr&time,tsarr(0,:),pres)
map(9) =gsn_csm_xy(wks,tsarr&time,tsarr(8,:),pres)

yres = True
yres@gsnPanelYWhiteSpacePercent = 0.0
yres@gsnFrame = False

xres = True
xres@txFontHeightF = 0.0145
gsn_text_ndc(wks,"Top X-axis",.5,.935,xres)
gsn_text_ndc(wks,"Bottom X-axis",.5,.035,xres)
drawNDCGrid(wks) ;contributed fxn that can draws NDC grid to help place text.

Hope that helps,

>Delivered-To: asphilli AT
>Delivered-To: ncl-talk AT
>Date: Tue, 10 Jun 2003 15:13:36 -0700 (PDT)
>From: Hauss Reinbold <reinbold AT>
>To: <ncl-talk AT>
>MIME-Version: 1.0
>Subject: panel compression
>X-BeenThere: ncl-talk AT
>X-Mailman-Version: 2.0.13
>List-Help: <mailto:ncl-talk-request AT>
>List-Post: <mailto:ncl-talk AT>
>List-Subscribe: <>,
<mailto:ncl-talk-request AT>
>List-Id: NCAR Command Language User Group <>
>List-Unsubscribe: <>,
<mailto:ncl-talk-request AT>
>X-Spam-Status: No, hits=-1.7 required=5.0
tests=SPAM_PHRASE_03_05,USER_AGENT_PINE version=2.41
>Hey anyone,
>I'm using gsn_csm_xy to generate some time series statistics. I'm using
>resources vpHeightF and vpWidthF to make the X-axis longer than the
>Y-axis (so as to make the plots more readable). I do this for nine plots
>and then I panel them vertically using
>gsn_panel. I only label the top x-axis of the first plot and the bottom
>of the last plot and all plots have tmXMajorGrid and rmXMinorGrid set to
>true. Unfortunately, even with gsnPanelYWhiteSpacePercent = 0 there still
>seems to be an unfortunate amount of white space between plots. I want
>them to be almost touching, but not quite (so that it will be easy to
>follow the grid lines from plot to plot). I don't want them actually
>touching so the attachplots function isn't really what I'm looking for. I
>suspect the problem comes from my fooling with the viewport aspect ratio
>which leaves white space at the top and bottom of the graph which remains
>when it is put in panel form.
>So my questions are these:
>Is there a better way to change the aspect ratio than the vp resources?
>Is there a way to turn tmXBOn and tmXTOn to False and still get gridlines
>(I suppose I could just draw polylines, if I need to)?
>Is there a way to get rid of excess white space at the top and bottom of a
>Any other panel methods that might work for me?
>Thanks for your time
>Hauss Reinbold
>Master's Student, University of Reno, DRI, CEFA
>ncl-talk mailing list
>ncl-talk AT

Adam Phillips email: asphilli AT
Climate and Global Dynamics Division tel: (303) 497-1726
National Center for Atmospheric Research fax: (303) 497-1333
P.O. Box 3000
Boulder, CO 80307-3000

ncl-talk mailing list
ncl-talk AT

This archive was generated by hypermail 2b29 : Tue Jun 10 2003 - 16:29:02 MDT