[ncl-talk] top x-axis label
yang yang
yang.yang816 at gmail.com
Wed Apr 14 19:24:37 MDT 2021
Dear Sir/Madam:
I would like to label the bottom and top x-axis, which are different.
For the top-axis, I set:
res at tmXTMode = "Explicit"
res at tmXTValues =
(/log10(2*3.14/1000000.),log10(2*3.14/500000.),log10(2*3.14/250000.),log10(2*3.14/100000.),log10(2*3.14/50000.)/)
res at tmXTLabels = (/"1000","500","250","100","50"/)
For the bottom-axis, I set:
res at tmXBMode = "Explicit" ; explicit labels
res at tmXBValues = (/-6,-5,-4,-3/)
res at tmXBLabels =
(/"10~S~-6~N~","10~S~-5~N~","10~S~-4~N~","10~S~-3~N~"/)
The label of the bottom axis can show as I want successfully. However, the
top-axis does not show anything. I have checked codes and could not find
any problems. Can you please sort this out for me? The plotting parameters
are shown below.
Thanks very much!
Regards
Ed
;************************************************
; plotting parameters
;************************************************
wks_type = "png"
wks_type at wkWidth = 1200
wks_type at wkHeight = 1200
wks = gsn_open_wks (wks_type,"ke-spectra") ; open
workstation
res = True ; plot mods desired
res at gsnFrame = False ; don't advance frame yet
res at xyLineThicknesses = (/2,2,2,2,2/) ; make lines thicker
res at xyDashPatterns = (/0,0,0,0,0/) ; make all lines solid
res at xyLineColors = (/"black","blue","green","red","yellow"/)
; change line color
res at xyMarkLineMode = "MarkLines"
res at xyMarkers = (/0,0,0,0,0/)
res at xyMarkerColors = (/"black","blue","green","red","yellow"/) ;
different colors`
res at vpHeightF= 0.4 ; change aspect ratio of plot
res at vpWidthF = 0.6
res at trYMinF = 3.8 ; min value on y-axis
res at trYMaxF = 6.5 ; max value on y-axis
res at trXMinF = -6. ; min value on x-axis
res at trXMaxF = -3.
res at tmXTMode = "Explicit"
res at tmXTValues =
(/log10(2*3.14/1000000.),log10(2*3.14/500000.),log10(2*3.14/250000.),log10(2*3.14/100000.),log10(2*3.14/50000.)/)
res at tmXTLabels = (/"1000","500","250","100","50"/)
res at tmXBMode = "Explicit" ; explicit labels
res at tmXBValues = (/-6,-5,-4,-3/)
res at tmXBLabels =
(/"10~S~-6~N~","10~S~-5~N~","10~S~-4~N~","10~S~-3~N~"/)
res at tmYLMode = "Explicit"
res at tmYLValues = (/4.,5.,6./)
res at tmYLLabels = (/"10~S~4~N~","10~S~5~N~","10~S~6~N~"/)
res at tmXBLabelFontHeightF = 0.0205
res at tmXTLabelFontHeightF = 0.0205
res at tmYLLabelFontHeightF = 0.0225
res at tmYLLabelFont = "helvetica"
res at tmXBLabelFont = "helvetica"
res at tmXTLabelFont = "helvetica"
res at vpXF = 0.2 ; start plot at x ndc coord
res at tiYAxisString = "KE(kg m~S~-3~N~ m~S~2~N~ s~S~-2~N~)" ; axis string
res at tiXAxisString = "k (radians m~S~-1~N~)" ; axis string
res at tiMainString = "11-16 km layer" ; title
plot = gsn_csm_xy(wks,kf,log10(tke),res)
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210415/37d90b4e/attachment.html>
More information about the ncl-talk
mailing list