[GRASS-user] common legend for the set of maps

Hamish hamish_b at yahoo.com
Thu Aug 21 08:51:25 EDT 2008

> I have set of map with foolowing (example) ranges:
> 0.34-1.1
> 0.67-2.4
> 0.12-0.8
> And I need common legend for that set i.e 0.12-2.4
> I think I shoud create map with range of data 0.12-2.4 and
> use it as the source to the legend
> I tried with r.plane and r.mapcalc but it is difficult to
> adjust proper values
> any ideas? (or simple solution?)

You don't need another map, you can set color rules manually for the
first map (color=rules) and use the whole range. then copy that to other
maps with 'r.colors rast='. Finally use 'd.legend range=min,max' to
expand the legend beyond the specific map's range.

A r.mapcalc way to make a two value map:
  r.mapcalc dummy='if(row() < 5, 0.12, 2.4)'



More information about the grass-user mailing list