[ncl-talk] About specify color of specific places, when do contour plotting

Mary Haley haley at ucar.edu
Tue Jan 17 16:16:09 MST 2017


Tao,

It's only possible to have one missing data value at a time.  Couldn't you
just use cnLevels and cnFillColors together to specific what colors you
want for each range of data?

Here are a couple of example scripts that might do what you want.

--Mary


On Mon, Jan 16, 2017 at 8:32 PM, Tao Lu <hakufu.asano at gmail.com> wrote:

> Dear Mary
>
> Thank you for your reply.
> It helps a lot.
>
> If I have two kinds of missing data, is it possible to show different
> color for two kinds of missing data?
>
> Tao
>
> El 17 ene 2017, a las 7:21, Mary Haley <haley at ucar.edu> escribió:
>
> If you simply mean how to fill your missing data values in black, then try:
>
>   res at cnMissingValFillColor = "black"
>
> Your data_rain_integer variable must have _FillValue set to whatever the
> missing values are, in order for this to work.
>
>
> --Mary
>
>
>
> On Sun, Jan 15, 2017 at 2:18 AM, Tao Lu <hakufu.asano at gmail.com> wrote:
>
>> Dear ncl-talk
>>
>> I have some data like this:
>> about rain density 0.0 ~ 409.0 mm/h step 0.1 mm/h
>> integer number rain density
>> 0 0.1 mm/h less then
>> 1 0.1 mm/h
>> 2 0.3 mm/h
>>   .
>>   .
>> 4089 409.0 mm/h
>> 4090 409.0 mm/h more then
>> 4091 out of the obsevation region
>> 4092 not observed
>>
>> I define rain density in this way:
>>     if data_rain_integer == 4090:
>>         rain_density = 500
>>     elif data_rain_integer == 4091:
>>         rain_density = -1000
>>     elif data_rain_integer == 4092:
>>         rain_density = -999
>>     else:
>>         rain_density = data_rain_integer*0.1
>>
>> Do you know how to specify not observed data as black color when I plot
>> rain density contour?
>>
>> Yours sincerely,
>> Tao
>>
>>
>> --
>> ******************************************************
>> 盧 涛 (ル タオ) 修士課程2年
>>
>> 〒112-8551 東京都文京区春日1-13-27
>>
>> 中央大学理工学研究科都市環境学専攻
>>
>> 河川・水文研究室(山田正教授)
>>
>>
>> TEL: 03-3817-3406;   Phone: 070-2188-7509
>> Email1: hakufu.asano at gmail.com <mail%3Amet.yamos at gmail.com>
>> Email2: lutao at civil.chuo-u.ac.jp <mail%3Ayamoto at civil.chuo-u.ac.jp>
>> *******************************************************
>> ******************************************************
>> Tao Lu    (M. Eng)
>> Laboratory of River Engineering and Hydrology,
>> Dept. of Civil and Environmental Engineering,
>> Graduate School of Science and Engineering,
>> Chuo University
>>
>> 1-13-27,Kasuga,Bunkyo-ku,Tokyo
>> 112-8551, Japan
>> TEL: 03-3817-1805;   Phone: 070-2188-7509
>> Email1: hakufu.asano at gmail.com <mail%3Amet.yamos at gmail.com>
>> Email2: lutao at civil.chuo-u.ac.jp <mail%3Ayamoto at civil.chuo-u.ac.jp>
>> *****************************************************
>>
>> _______________________________________________
>> 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/20170117/80edb25c/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msgval_color1.ncl
Type: application/octet-stream
Size: 797 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170117/80edb25c/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msgval_color2.ncl
Type: application/octet-stream
Size: 841 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170117/80edb25c/attachment-0001.obj 


More information about the ncl-talk mailing list