[ncl-talk] label the plot using the own created list

Adam Phillips asphilli at ucar.edu
Mon Apr 30 11:11:10 MDT 2018


Hi Jiashu,
If you setting the following:
res at tmXBMode        = "Explicit"
res at tmXBValues      = ispan(0,ntimes-1,1)
you generally want to tell NCL what labels to use by setting tmXBLabels:
res at tmXBLabels      = date_list
I see you have the tmXBLabels line in your script (commented out) but I do
not see a date_list array initialized anywhere.

Furthermore, you have this line:
res at lbLabelStrings  = date_list
(Again, date_list is not initialized prior to this line.) In order to
explicitly set the lbLabelStrings for a contour plot you also have to
set cnExplicitLegendLabelsOn = True.
See documentation here:
http://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnExplicitLabelBarLabelsOn

Hope that helps. If not, or if you have any further questions please
respond to the ncl-talk email list.
Adam

On Thu, Apr 26, 2018 at 7:42 PM, Ying Song <ying.song at sjsu.edu> wrote:

> Hi, NCL helper,
>
> I have a questions self defined labelbar want extract date info from a
> list of ascii files. The filenames  are following these pattern: (th1001_
> *2015_05_07*_18.l100)
>
> I created a new list(date_list) and use it to label my plot. I tried:
>    res at tmXBLabels      = date_list
>
>
> Received the err:
> warning:attsetvalues: the value associated with (lbLabelStrings) does not
> have
> warning:The value associated with (lbLabelStrings) does not have an HLU
> representation.
>
> Any thoughts or suggestions about this error? Thank you very much!
>
> Jiashu
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180430/f468a7cd/attachment.html>


More information about the ncl-talk mailing list