[Thread Prev][Thread Next][Index]

Re: [ferret_users] [ferret] pallette question



Hi -
To add to Billy's answer, at least one of the palettes included with Ferret have white as the central color, If you set your contour or shade levels so they're centered at 0 you'll get white where the variaible is 0. Look for the palette called white_centered in the FAQ, http://www.ferret.noaa.gov/Ferret/FAQ/graphics/colorpalettes.html

Also, just to be a bit picky in what Billy says in replacing the value 0 with a blank value, if the missing-value flag in your data is not the Ferret default value of 1.e-34, you could do this to make the variable take on the missing value of variable "vname" at locations where vname is 0.

let vname_whitezero = if vname eq 0 then `vname,return=bad` else vname
shade/pal=any_palette vname_whitezero


Ansley

William S. Kessler wrote:

It's not exactly clear what you mean by this.

1. For variables that have both positive and negative values (like a field of anomalies), you might want to color positive values red, negative values blue, and near-zero values white (or peraps light gray). In that case use a palette something like:

0 0 100 100
20 20 20 100
45 100 100 100
55 100 100 100
80 100 20 20
100 100 100 0

An alternative is to lightly shade the near-zero values light gray, which would distinguish them from missing values:

0 20 20 100
49 85 85 85
51 85 85 85
100 100 20 20

2. To formally force values of exactly zero to be blank (i.e.unplotted and thus leaving them the color of the plot background, no matter what palette is chosen or what the range of values is):

let vname_whitezero = if vname eq 0 then (-1.e34) else vname
shade/pal=any_palette vname_whitezero

or maybe leave near-zero values white:

let vname_whitenearzero = if abs(vname) lt 100 then (-1.e34) else vname
shade/pal=any_palette vname_whitenearzero

Billy K

On Nov 18, 2005, at 8:52 AM, James Booth wrote:

Is there a way to force the areas that
have value zero to be colored in with white,
when using the fill or shade command,
regardless of the pallette I choose.

Thanks.

(I am using: FERRET v5.51)


*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*_*
Jimmy Booth
Atmospheric Oceanography
Graduate Student
UW, JISAO, Seattle, WA



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA

william.s.kessler@noaa.gov
Tel: 206-526-6221
Fax: 206-526-6744
Home page: http://www.pmel.noaa.gov/~kessler


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement