<div dir="ltr">Hi Ed,<div>Thank you for including an easy-to-follow script that shows your complete resource list. To set the top tick marks differently than the bottom tick marks, you need to set res@<a href="http://www.ncl.ucar.edu/Document/Graphics/Resources/tm.shtml#tmXUseBottom">tmXUseBottom</a> = False. </div><div>Note that the arrays passed to tmXBValues/tmXTValues need to be within the range of your specified trXMinF/trXMaxF settings. (Your settings are indeed within this range.)</div><div>Adam</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 14, 2021 at 7:24 PM yang yang via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Sir/Madam:<div><br></div><div>I would like to label the bottom and top x-axis, which are different.</div><div>For the top-axis, I set:</div><div>     res@tmXTMode          = "Explicit"<br>     res@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.)/)<br>     res@tmXTLabels = (/"1000","500","250","100","50"/)<br></div><div><br></div><div>For the bottom-axis, I set:</div><div>     res@tmXBMode          = "Explicit"         ; explicit labels<br>     res@tmXBValues        = (/-6,-5,-4,-3/)<br>     res@tmXBLabels = (/"10~S~-6~N~","10~S~-5~N~","10~S~-4~N~","10~S~-3~N~"/)<br></div><div><br></div><div>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.</div><div>Thanks very much!</div><div>Regards</div><div>Ed</div><div><br></div><div>;************************************************<br>; plotting parameters<br>;************************************************<br>wks_type = "png"<br>wks_type@wkWidth = 1200<br>wks_type@wkHeight = 1200<br><br> wks   = gsn_open_wks (wks_type,"ke-spectra")                 ; open workstation<br><br>  res          = True                   ; plot mods desired<br>  res@gsnFrame = False                  ; don't advance frame yet<br><br>   res@xyLineThicknesses = (/2,2,2,2,2/)               ; make lines thicker<br>   res@xyDashPatterns    = (/0,0,0,0,0/)      ; make all lines solid<br><br>   res@xyLineColors      = (/"black","blue","green","red","yellow"/)          ; change line color<br><br>res@xyMarkLineMode = "MarkLines"<br> res@xyMarkers      = (/0,0,0,0,0/)<br> res@xyMarkerColors = (/"black","blue","green","red","yellow"/) ;  different colors`<br>  res@vpHeightF= 0.4                    ; change aspect ratio of plot<br>  res@vpWidthF = 0.6<br></div><div>  res@trYMinF  = 3.8                   ; min value on y-axis<br>  res@trYMaxF  = 6.5                  ; max value on y-axis<br> res@trXMinF  = -6.                   ; min value on x-axis<br>  res@trXMaxF  = -3.<br><br>     res@tmXTMode          = "Explicit"<br>     res@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.)/)<br>     res@tmXTLabels = (/"1000","500","250","100","50"/)<br><br>     res@tmXBMode          = "Explicit"         ; explicit labels<br>     res@tmXBValues        = (/-6,-5,-4,-3/)<br>     res@tmXBLabels = (/"10~S~-6~N~","10~S~-5~N~","10~S~-4~N~","10~S~-3~N~"/)<br><br>     res@tmYLMode          = "Explicit"<br>     res@tmYLValues        = (/4.,5.,6./)<br>     res@tmYLLabels = (/"10~S~4~N~","10~S~5~N~","10~S~6~N~"/)<br>     res@tmXBLabelFontHeightF = 0.0205<br>     res@tmXTLabelFontHeightF = 0.0205<br>     res@tmYLLabelFontHeightF = 0.0225<br>     res@tmYLLabelFont = "helvetica"<br>     res@tmXBLabelFont = "helvetica"<br>     res@tmXTLabelFont = "helvetica"<br></div><div>  res@vpXF     = 0.2                  ; start plot at x ndc coord<br><br>  res@tiYAxisString = "KE(kg m~S~-3~N~ m~S~2~N~ s~S~-2~N~)"  ; axis string<br><br>  res@tiXAxisString = "k (radians m~S~-1~N~)"  ; axis string<br><br>  res@tiMainString     = "11-16 km layer" ; title<br><br>plot = gsn_csm_xy(wks,kf,log10(tke),res)<br></div><div><br></div><div>end</div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>