Re: position of the value 0 in cnLevels to be represented by white colour.

From: gibies george <gibies_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 09 2011 - 03:51:05 MST

Thank you Mary for the response.

I am using *gsn_csm_contour_map* with "*ViBlGrWhYeOrRe*" colour-map

 I wish to have :

the colours from 1 to 51 ie "*ViBlGr" to be used for negative values.*
*the colour 52 ie "White" to be used for zero.*
*the colours from 53 to 103 ie "YeOrRe" to be used for positive values.*
*
*
I tried to manage it using *gsnSpreadColorStart *and *gsnSpreadColorEnd* in
the cases when (data_min .gt. 0) or (data_max .lt. 0) but I don't know how
to handle the case when *(**data_min .lt. 0**) .and. (data_max .gt. 0) which
i really want. *

I am afraid that I may not get full range of color map while
using "gsn_contour_shade"

On 9 March 2011 03:57, Mary Haley <haley@ucar.edu> wrote:

> Maybe "gsn_contour_shade" is what you're looking for:
>
>
> http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_contour_shade.shtml
>

> --Mary
>
> On Mar 8, 2011, at 5:47 AM, gibies george wrote:
>
> How can I get the position of the value 0 in cnLevels while setting the
> resources for contour plot ?
>
> My requirement is as follows.
>
> I would like to get *white to represent the value near to zero* in
> contour interval irrespective of the data range.
> ---------
> ----------
> -----------
>
> gsn_define_colormap(wkspnl,"ViBlGrWhYeOrRe")
> white = 52
> data_min = min(data)
> data_max = max(data)
>
> if (data_min .gt. 0) resc@gsnSpreadColorStart = white
> resc@cnLevelSelectionMode = "ManualLevels" resc@cnMinLevelValF = 0 end if
> if (data_max .lt. 0) resc@gsnSpreadColorEnd = white
> resc@cnLevelSelectionMode = "ManualLevels" resc@cnMaxLevelValF = 0 end if
>
> if ((data_min .lt. 0) .and. (data_max .gt. 0))
> *----------*
> *???????*
> *----------* end if
> ----------------------
> -----------------------
> ----------------------
>
> How can I implement this?
>
>
> --
> *Gibies George, CSIR-RF,*
> *Seasonal Scale Prediction Group,
> Climate and Global Modelling Division,
> Indian Institute of Tropical Meteorology,
> Dr. Homi Bhabha Road,
> NCL (P. O.), Pashan,
> Pune 411008, India.*
>
> *http://sites.google.com/site/gibiesge/*
>
> Please Think about the environment. Save paper; Save Trees; and don't print
> this e-mail unless it is necessary.
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>

-- 
*Gibies George,   CSIR-RF,*
*Seasonal Scale Prediction Group,
Climate and Global Modelling Division,
Indian Institute of Tropical Meteorology,
Dr. Homi Bhabha Road,
NCL (P. O.), Pashan,
Pune 411008, India.*
*http://sites.google.com/site/gibiesge/*
Please Think about the environment. Save paper; Save Trees; and don't print
this e-mail unless it is necessary.

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 9 03:51:18 2011

This archive was generated by hypermail 2.1.8 : Thu Mar 10 2011 - 21:44:37 MST