[ncl-talk] lbLabelFormat functionality request.
Alan Brammer
abrammer at albany.edu
Tue Jan 20 09:57:54 MST 2015
NCLers.
I would like to be able to format a color bar label, without using
sprintf. It seems that cnLineLabelFormat
<https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLineLabelFormat>
claims that it should do this job but for me today it is not making any
difference to the label bar.
Am I missing a step or something? cnLineLabelFormat does it's job nicely on
the plot, but has no impact on the labelbar.
Request:
Existence of an lbLabelFormat resource, that is potentially linked to
cnLineLabelFormat when not defined itself.
For now I will stick to creating my own array of labels, and pumping them
through sprintf.
Thanks,
~Alan.
example code of cnLineLabelFormat not affecting the label bar below:
x = fspan(-5, 5, 100)
data = new( (/100,100/), float)
do y=0, 99
data(y,:) = exp(( -(x^2)/4) - (((x(y))^2))) ;; quick way of creating some
nice data to plot.
end do
wks = gsn_open_wks("x11","")
res = True
res at cnFillOn = True
res at cnFillMode= "RasterFill"
res at cnLinesOn = False
res at cnLineLabelsOn = True
res at cnLineLabelFormat = "0@;*.4f"
res at lbAutoManage = False
res at lbOrientation = "vertical"
plot = gsn_csm_contour(wks, data, res)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150120/6fc91d30/attachment.html
More information about the ncl-talk
mailing list