<div dir="ltr">Thanks Mary,   (Sorry hit reply way to early)<div><br></div><div>Yeah, thats how I&#39;ve been doing it in the past as well. </div><div><br></div><div>Last note on the matter then,  the documentation for cnLineLabelFormat may possibly be misleading then?  </div><div>&quot;Note that since the labels used for the ContourPlot LabelBar are copied from the cnLineLabelStrings resource the cnLineLabelFormat resource also controls the formatting of the LabelBar labels. &quot;</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 1:54 PM, Alan Brammer <span dir="ltr">&lt;<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Mary, </div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 12:48 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Alan,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">This is an issue for me as well, and I was surprised to see there&#39;s no ticket for this. I just created one (NCL-2125).  </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I don&#39;t think this is a bug. It&#39;s simply an oversight that we never created a &quot;format&quot; type of resource for labelbar labels.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You can work around this somewhat awkwardly by:</div><div class="gmail_default" style="font-size:small"><ul><li>Creating the plot (set res@gsnDraw = False and res@gsnFrame = False)<br></li><li>Retrieving the &quot;cnLineLabelStrings&quot; resource to get the formatted strings</li><li>Setting &quot;res@lbLabelStrings&quot; to this retrieved resource</li><li>Recreating the plot with the newly added lbLabelStrings resource</li></ul><div>You can also set lbLabelStrings the first time you create the plot, but then you would have to use &quot;sprintf&quot; as you mentioned above.</div><div><br></div><div>I&#39;ve attached a modified version of your script that uses the method outlined above.</div><div><br></div><div>--Mary</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, Jan 20, 2015 at 9:57 AM, Alan Brammer <span dir="ltr">&lt;<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">NCLers. <br><br>I would like to be able to format a color bar label, without using sprintf.  It seems that <a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLineLabelFormat" target="_blank">cnLineLabelFormat</a> claims that it should do this job but for me today it is not making any difference to the label bar.  <br><br>Am I missing a step or something? cnLineLabelFormat does it&#39;s job nicely on the plot, but has no impact on the labelbar. <br><br><br>Request:<br>Existence of an lbLabelFormat resource,  that is potentially linked to cnLineLabelFormat when not defined itself.  <div><br></div><div>For now I will stick to creating my own array of labels, and pumping them through sprintf.  <br></div><div><br></div><div><br></div><div>Thanks, </div><div>     ~Alan.</div><div><br></div><div><br></div><div><br></div><div>example code of cnLineLabelFormat not affecting the label bar below:</div><div><br><div>x = fspan(-5, 5, 100)</div><div>data = new( (/100,100/), float)</div><div>do y=0, 99</div><div>data(y,:) = exp(( -(x^2)/4) - (((x(y))^2)))   ;; quick way of creating some nice data to plot. </div><div>end do</div><div><br></div><div>wks = gsn_open_wks(&quot;x11&quot;,&quot;&quot;)</div><div><br></div><div>res = True</div><div>res@cnFillOn = True</div><div>res@cnFillMode= &quot;RasterFill&quot;</div><div>res@cnLinesOn = False</div><div>res@cnLineLabelsOn = True<span></span><span></span><a href="http:///" target="_blank"></a></div><div>res@cnLineLabelFormat = &quot;0@;*.4f&quot;</div><div>res@lbAutoManage = False</div><div>res@lbOrientation = &quot;vertical&quot;</div><div>plot = gsn_csm_contour(wks, data, res)</div></div></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>