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

Hamish hamish_b at yahoo.com
Sun Aug 9 23:16:40 EDT 2009


Tom wrote:
> > I just tried using r.colors.stdev -z — I guess I incorrectly
> *assumed* it would not do what I wanted. It looks like it does
> what I want except for the option to invert the colors. So,
> adding the 'Invert' option would be great.

if you don't mind such things it's trivial to open the script up
in a text editor and add the -n flag, or change red<->blue.

Nikos wrote:
> Perhaps a (very) stupid (attempt to) work-around for the time being:
> "r.colors -n rast=..." on a map already colored based
> on "r.colors.stdev -z" :-?

in fact very smart -- it works well:

#spearfish
g.region rast=elevation.dem
eval `r.univar -g elevation.dem`
r.mapcalc "elev.diff = elevation.dem - $mean"
r.colors.stddev -z elev.diff
d.mon x0
d.rast elev.diff

# flip current color rules:
r.colors -n elev.diff rast=elev.diff
d.rast elev.diff


Hamish



      



More information about the grass-user mailing list