[ncl-talk] A question about classification data

Karin Meier-Fleischer meier-fleischer at dkrz.de
Mon Jul 17 04:52:31 MDT 2017


Hi,

if you have 16 label strings in an array and ninfo is 16 then you have 
to write

res at lbLabelStrings   = ispan(0,ninfo-1,1)

NCL's first element of an array is 0 and the last is n-1.

Bye,
Karin

Am 17.07.17 um 11:20 schrieb 古枫玥瑟:
>
>
>   Dear ncl-talk,
>
>  I have a question about LabelStrings when running "ncl vegland_3.ncl 
> <http://www.ncl.ucar.edu/Applications/Scripts/vegland_3.ncl>"(Vegetation 
> and landuse classifications are examples of categorical data).
>
>
>    I have set "res at lbLabelStrings   = ispan(1,ninfo,1)",but the lable
>   as shown from 2 to Lable_16 in the attachment file(.png) .
>
> You can see the details code in attachment file.
> why did this question occour?how should I write the code?
>
>
>
>> Many thanks in advance
>> Regards
>> Yan
>> Shanghai Institute of Meteorology,China.
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170717/3bf348ed/attachment.html 


More information about the ncl-talk mailing list