[GRASS-user] Help on Define a color table

Hamish hamish_b at yahoo.com
Tue Apr 26 16:35:38 EDT 2011


Franz wrote:
> I haver searched among color tables and I didn't find any
> example like this:

the "differences" color rule looks like this:

0% blue
0 white
100% red

also, have a look at r.colors.stddev's -z flag, as that makes
the red and blue above equally scaled. (so if range was -1 to
100, the -1 would only be a very light blue instead of full-blue.


> I want to define a color table where:
> all negative values are blue
> all zeros are green
> all positive values are red.

assuming negative/positive values always exist, try:

0% blue
0 blue
0 green
0 red
100% red


if you want a hard step, repeating works well for two colors next
to each other, not sure if it will go for 3. You might want to
make -0.0001 thru 0.0001 as green if it really is a full floating
point spectrum. Also need to verify that hard-step behaviour
isn't broken in grass7.


?,
Hamish



More information about the grass-user mailing list