[ncl-talk] LabelBar Positioning

Alan Brammer abrammer at albany.edu
Wed Oct 14 11:05:24 MDT 2015


This has frustrated me for a while and I always end up going with a trial and error solution to get the job done.

If I want to “attach” something to a corner of the plot I can usually do it pretty easily.  

e.g Vector reference label:
vcres at vcRefAnnoZone = 0
vcres at vcRefAnnoJust = "TopRight"
vcres at vcRefAnnoParallelPosF = 0.5
vcres at vcRefAnnoOrthogonalPosF = -0.5

How do I do this with a label bars? 
pmLabelBarZone doesn’t seem to behave in the same manner as above. 
Trial and error with pmLabelBarOrthogonalPosF is a hassle and then seems to break occasionally if the plot shape changes.  



;   simple script  ;  Our ramadda server should give access thru open dap to anyone. (I think). 

tf = addfile("http://ramadda.atmos.albany.edu:8080/repository/opendap/synth:4c8dfccb-37c5-43ff-be7b-79a7200bd6e8:LzIwMTUvdC4yMDE1LjBwNS5hbmwubmM=/entry.das","r")
t = tf->t(0,:,:,:)  ; time|lev|lat|lon

wks = gsn_open_wks("x11","")

res = True
res at trYMinF = 300
res at trYMaxF = 1000
res at cnFillOn = True
res at tmYROn = False
res at tmYRMode = "Automatic"
res at lbOrientation = "Vertical"
res at lbLeftMarginF = 0.   ;;  There appears to still be a margin?
plot = gsn_csm_pres_hgt(wks, t(:,{12.5},:), res)

res at pmLabelBarZone = 0
res at pmLabelBarOrthogonalPosF = 0.5    ; Disappeared somewhere?  
plot = gsn_csm_pres_hgt(wks, t(:,{12.5},:), res)

res at pmLabelBarOrthogonalPosF = -0.01    ;  how to guess this number or better way to do it?
plot = gsn_csm_pres_hgt(wks, t(:,{12.5},:), res)



Alan. 




More information about the ncl-talk mailing list