[GRASSLIST:6082] Re: null color thru r.colors?

Glynn Clements glynn.clements at virgin.net
Thu Apr 17 18:10:03 EDT 2003


Parviez Hosseini wrote:

> I've look through the man pages, and the list archives, but I can't figure 
> out how to change the color that null values appear using r.colors.
> I can change it using the interactive d.colors, but that is sub-optimal, 
> and I'm interested in it for a "r.colors $MAP col=rules" type application.

Use "nv" to set the null colour, e.g.

	GRASS:~ > r.colors elevation.dem color=rules
	Enter rules, "end" when done, "help" if you need it.
	Data range is 1066 to 1840
	> 1066 black
	> 1840 white
	> nv red
	> end
	Color table for [elevation.dem] set to rules
	GRASS:~ > 

This is "mentioned" in the text which is displayed if you type "help",
although it is far from clear:

	> help
	Enter a rule in one of these formats:
	 color
	 val color
	 n% color
====>	 nv color
	 default color
	color can be one of:
	 white black red green blue yellow magenta cyan aqua grey gray orange brown
	 purple violet indigo
	or an r,g,b triplet, e.g.: 0 127 255

It isn't mentioned in the man page, but should be.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list