[GRASS-user] Help using color tables (differences)

Thomas.Adams at noaa.gov Thomas.Adams at noaa.gov
Fri Aug 7 20:39:44 EDT 2009


Hamish,

Thank you! I think your suggestion will work for me; I'll let you know…

Cheers!
Tom

----- Original Message -----
From: Hamish <hamish_b at yahoo.com>
Date: Friday, August 7, 2009 6:39 pm
Subject: Re: [GRASS-user] Help using color tables (differences)

> Hi Thomas,
> > I have been using r.colors -n map=mapname color=differences
> > to display soil moisture differences from one day to another
> > (to identify areas that have received precipitation and
> > areas that are drying); I would like to depict wetting areas
> > as shades of blue to white and drying areas as shades of
> > white to red — as the the option color=differences tries
> > to do. The difficulty I'm running into is that unless there
> > is a fairly even proportion of of positive & negative
> > values I'll have wetting areas colored a shade of red
> > instead of blue, but more often, the reverse where drying
> > areas are colored blue, due to the shift of the color scale.
> > Ideally, I want values close to -0- to be white and wet
> > areas to be a shade of blue and dry areas to be a shade of
> > red. How can I do this? Any suggestions?
> 
> try the 'r.colors.stdev -z' which was recently moved into the
> main source tree from the addons repository. maybe a new option
> could be added to do a better differences map.
> 
> some examples here:
>  http://hamish.bowman.googlepages.com/grass_color_maps
> 
> 
> for the color rules $GISBASE/etc/differences does:
> 0% blue
> 0 white
> 100% red
> 
> what you really want is to have it evenly scaled like:
> 
> peak = the greater of abs($min) and abs($max)
> -$peak blue
> 0 white
> $peak red
> 
> 
> you could use awk to do that a>b logic in a script if you needed
> to.
> 
> then use those rules as custom color rules with r.colors.
> 
> or for you entire dataset decide some static rules, then inter-
> map differences are comparable on the same visual scale.
> 
> 
> Hamish
> 
> 
> 
>      
> 
> 


More information about the grass-user mailing list