[Thread Prev][Thread Next][Index]

Re: color scale



At 9:48 pm +0000 16/11/99, Mark A. Verschell wrote:
>I just mailed Steve Hankin on this topic, and there is a way to do what Glenn
>suggests. Unfortunately - it could be very slow depending on the size of the
>region you are plotting....
>
>For example, if you are doing a 2-d x-y plot of data:
>
>yes? let maxv=myvar[x=@max,y=@max]
>yes? let minv=myvar[x=@min,y=@min]
>yes? fill/level=('minv')(-10,10,1)('maxv') myvar

Cunning! Would be useful in a script.

Actually, though, what I was suggesting was subtly different. I'm assuming
the original question involved creating a colour scale from, say, 1 to 10
in steps of 1 with a key legend to match. The above (with back quotes, not
forward) would produce a key with minv -> maxv rather than 1 to 10 which
may not be desirable.

I was suggesting creating a new variable but where values exceeded 10 then
overwrite those values with 10; similarly with minv so that the range of
values didn't exceed the limits required on the colour scale legend. My
ferret skills are not up to much yet but I wonder whether something like:

let new = 10.0 if `old gt 10.0`
let new = 1.0  if `old lt 1.0`

might work?

   Glenn


----
Dr. Glenn Carver, Senior Research Associate,
Centre for Atmospheric Science, Chemistry Dept., Cambridge University, UK
mailto:Glenn.Carver@atm.ch.cam.ac.uk   http://www.atm.ch.cam.ac.uk/~glenn/

              "I never think of the future, it comes soon enough"
                   - Albert Einstein




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement