[ncl-talk] How to restore the "Height" Label

Laura Fowler laura at ucar.edu
Mon Apr 15 13:17:23 MDT 2019


Hello:

I am drawing a longitude versus pressure panel plot using the procedure
gsn_csm_pres_hgt (see test.png). Between the left and the right panels, I
do not want any labels  but I want to restore the right labels including
"Height (km)" for the right panel. I used the following:


nplots = 2

plots  = new(nplots,graphic)


diag = rhu_gf(nFGLevels|:,lon|:)

;res at gsnLeftStringParallelPosF = -0.05

res at gsnLeftString = "a) GFu: RELATIVE HUMIDITY (-)"

res at tiYAxisOn     = True

res at tmYLOn        = True

res at tmYLBorderOn  = True

res at tmYROn        = True

res at tmYRBorderOn  = True

res at tmYRLabelsOn  = False

plot = gsn_csm_pres_hgt(wks,diag,res)

getvalues plot at contour

   "pmAnnoManagers" : am_ids

end getvalues

index = ind(NhlName(am_ids).eq."right_axis")

if(.not.ismissing(index)) then

   NhlRemoveAnnotation(plot at contour,am_ids(index))

end if

plots(0) = plot

delete(index)

delete(plot)


diag = rhv_gf(nFGLevels|:,lon|:)

;res at gsnLeftStringParallelPosF = -0.05

res at gsnLeftString = "b) GFv: RELATIVE HUMIDITY (-)"

res at tiYAxisOn     = True

res at tmYLOn        = True

res at tmYLBorderOn  = True

res at tmYLLabelsOn  = False

res at tmYROn        = True

res at tmYRBorderOn  = True

res at tmYRLabelsOn  = True

plots(1) = gsn_csm_pres_hgt(wks,diag,res)


Unfortunately that did not restore the labels and title of the right axis.
I wonder if that has to do with using NhlRemoveAnnotation set in plots(0).
Is there a way around this?

Thanks,
Laura



-- 
!-------------------------------------------------------------------------------------------------------------
Laura D. Fowler

Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000

e-mail: laura at ucar.edu
phone: 303-497-1628

!-------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190415/096324cc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.png
Type: image/png
Size: 46656 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190415/096324cc/attachment.png>


More information about the ncl-talk mailing list