Re: How to assign a specific color to a specific range of values?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 20 Dec 2006 09:26:40 -0700 (MST)

Hi Zhang,

You can accomplish this one of two ways:

1. Set "cnLevelSelectionMode" resource to "ManualLevels" and
    then set the minimum/maximum contour levels and the spacing:

    res_at_cnLevelSelectionMode = "ManualLevels"
    res_at_cnMinLevelValF = 8.0
    res_at_cnMaxLevelValF = 28.0
    res_at_cnLevelSpacingF = 2.0

    [These values are just examples. You can use whatever you like.]

2. Set "cnLevelSelectionMode" resource to "ExplicitLevels" and
    then explicitly set the contour levels you want:

    res_at_cnLevelSelectionMode = "ExplicitLevels"
    res_at_cnLevels = (/8, 10, 11, 14, 15, 17, 20, 23, 24, 25, 28/)

I recommend using #1 if you want equally-spaced contour levels.
Otherwise, you can use #2.

You can see an example on the panel applications page:

    http://www.ncl.ucar.edu/Applications/panel.shtml#ex4

[Click on "panel_4.ncl" to see the script.]

--Mary

On Wed, 20 Dec 2006, zhang zuowei wrote:

> Hi.
>
> I've got two 2D variables of SST in the same area, one for winter whose
> values vary between 8.36842501163485 and 25.4971926373809 Centigrade, and
> the other one for summer ranging from 17.8631000518799 to
> 28.6405788929094Centigrade.
>
> Then I try to draw them on two pictures respectively with the same colorbar.
> I mean, I want to assign a specific color to a specific range of values,
> thus the same color in the two different pics represents the same value. How
> can I achieve it¡©
>
> Could anybody give me a help¡©Thanks¡ª
>
> Zuowei
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Dec 20 2006 - 09:26:40 MST

This archive was generated by hypermail 2.2.0 : Wed Dec 20 2006 - 09:56:26 MST