[ncl-talk] Questions on vertical white space & tmXB stride Control

Adam Phillips asphilli at ucar.edu
Wed Dec 9 15:32:52 MST 2020


Hi LSL,
I am having a bit of trouble following your script with the large number of
commented out lines. Please in the future send as clean and minimized a
script as possible that illustrates the issues you are having. This will
increase the odds that someone will respond.

- You can control the vertical placement of the panel title by
setting gsnPanelMainPosYF. It looks like you tried this. I would think a
value of .90 is a good place to start, and you can adjust the setting from
there. Note that NCL will allocate the space for each plot in the panel
based on the size of the first plot. You can change this by setting
gsnPanelScalePlotIndex
<http://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnPanelScalePlotIndex>
in
your panel resource list. Your first plot has subtitles, so NCL will
allocate a bigger space for the 2nd and 3rd panels as they do not have
subtitles. You can completely override how NCL panels plots by using the
output from gsnPanelDebug and set the X/Y positions exactly. See panel
example #19 here: http://www.ncl.ucar.edu/Applications/panel.shtml#ex19

- I am surprised that the plots are that spaced apart. Try setting the
following resources:
res at tiMainOn = False   ; do not allocate space for the main title.
resP at gsnPanelYWhiteSpacePercent = 0.   ; set the white space between plots
along the y-axis to 0%

- If you want complete control over the x-axis tickmarks, I would recommend
setting tmXBMode = "Explicit", and set tmXBValues and tmXBLabels as you
want. Note that the values input into tmXBValues must be in the same range
as the x array input into gsn_csm_xy:
; example
 res at tmXBMode        = "Explicit"
 res at tmXBValues = ispan(0,720,360)
 res at tmXBLabels = (/"Jan 2000","Jan 2001","Jan 2002"/)
 plot = gsn_csm_xy(wks,ispan(5,725,5),arr,res)

In the above, the array passed into tmXBValues overlaps with the x-input
into gsn_csm_xy (=ispan(5,725,5)). Again, this is just an example, but try
applying that concept to your script.

Hope that helps!
Adam



On Tue, Dec 8, 2020 at 7:47 PM LSL via ncl-talk <ncl-talk at mailman.ucar.edu>
wrote:

> Dear NCL Community,
>
>
> I am wondering:
>
> 1) how to shrink the vertical white spaces between subfigure (a) and (b),
> (b) and (c);
>
> 2) how to add more tmXB labels as 01/01, 01/02, 01/03... in figure
> "Timeseries_Site_574610_lat_30.7333_lon_111.367_Yichang_ten_days.png";
>
> 3) how to move down the main title?
>
>
> These are indicated in the attached figure. The ncl script is also
> attached.
>
>
> Thanks in advance.
>
> LSL
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk



-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201209/50a253de/attachment.html>


More information about the ncl-talk mailing list