<div dir="ltr">Hi SBR,<div>In order to use tmXBLabels/tmXBValues you need to se tmXBMode = "ExplicitLabels". See the coding for the bottom panel of example #2 here:<br></div><div><a href="http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex2">http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex2</a><br></div><div>If you have further questions please respond to the ncl-talk email list.</div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 10, 2018 at 12:49 PM S Br <<a href="mailto:sbr.climate@gmail.com">sbr.climate@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<div>I am trying to generate a bar plot diagram and would like override the default X-axis labels with the text labels. I am trying 'res@tmXBLabels' but it doesn't work. My code is given below.</div><div><br></div><div>Thanks.</div><div>SBR</div><div><br></div><div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div><div><br></div><div>begin</div><div><br></div><div>;********************************************************</div><div>; the data</div><div>;********************************************************</div><div>  x = (/1,2,3,4,5,6,7,8,9,10,11,12/)</div><div>  y = (/0.32, 0.29, 0.71, 0.09, 0.02, 0.57, 0.62, 0.85, 0.84, 0.12, 0.29, 0.36/)</div><div>  labels = (/"A","B","C","D","E","F","G","H","I","J","K","L"/)</div><div>;********************************************************</div><div>; create the plot</div><div>;********************************************************</div><div>  wks = gsn_open_wks("png","bar_plot")                  ; send graphics to PNG file</div><div>  res                       = True                 ; plot mods desired</div><div><br></div><div>;  res@gsnFrame              = False                ; don't advance frame yet</div><div>  res@gsnXYBarChart         = True                 ; turn on bar chart</div><div>  res@gsnXYBarChartBarWidth = 0.75                 ; change bar widths</div><div>  res@gsnXYBarChartColors = (/"firebrick","red","orange","green", \</div><div>  "navy","blue","SkyBlue","SlateBlue","navy","blue","SkyBlue","SlateBlue"/)            ; choose colors</div><div><br></div><div>  res@tmXBOn                = True                ; turn off tickmarks at bot</div><div>  res@trYMinF               = 0                    ; bring bars down to zero</div><div>  res@trXMinF               = 0                    ; adds space on either end</div><div>  res@trXMaxF               = 13                    ; of the 1st and last bars</div><div><br></div><div>  res@tmXBLabels          = (/"A","B","C","D","E","F","G","H","I","J","K","L"/)</div><div><br></div><div>  res@tiMainString          = "Corelation"</div><div>  plot = gsn_csm_xy (wks,x, y,res)                  ; create plot</div><div><br></div><div>end</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="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>