[ncl-talk] space in annual cycle plot

Alan Brammer abrammer at albany.edu
Fri Jun 9 07:32:16 MDT 2017


​Your labels are strings, but the values on the x-axis are 0-11. As defined
about 5 lines from the bottom of your script.  The labels are just placed
at those values.  I assumed you'd be using 1-12, res at trXMaxF=11 will limit
the right edge of the plot to the value associated with the Dec label​ as
demonstrated on a version of your plot I made with sin(x) and cos(x) to
demonstrate.


​It helps to simplify problems to the barebones.  You can focus on this
problem ​with only 5-6 lines instead all of those resources and computation.

wks = gsn_open_wks("x11","")
res = True
res at tmXBMode="Explicit"
res at tmXBValues            =  ispan(0,11,1)   ;-- bottom x-axis tickmark
values
res at tmXBLabelFontHeightF  =  0.015            ;-- x-axis font size
res at tmXBLabels            = (/
"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" /)
;-- x-axis labels
res at trXMaxF = 11
plot = gsn_csm_blank_plot(wks, res)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170609/17a8bd13/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-06-09 at 09.26.50.png
Type: image/png
Size: 90115 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170609/17a8bd13/attachment-0001.png 


More information about the ncl-talk mailing list