[GRASSLIST:393] Re: Legends

Glynn Clements glynn.clements at virgin.net
Fri Jun 13 20:05:26 EDT 2003


Soil & Water Lab. wrote:

> * When displaying the legend of a CELL map, *all* the categories are 
> displayed, when in fact, one would be interested only in the categories 
> really displayed.  Actually, it's worse: if your categories are not 
> continuous (eg 10,11,12,27), the legend reports *all* the categories from the 
> smallest to the largest, when one would expect only the categories defined 
> (in the previous example, I have 18 labels in my legend, when I only need 4).
> 
> Is there an easy work around ? I thought about reclassifying the map to get 
> successive categories, but of course, I lose my colors.
> Do you think this could be implemented for a next version ? (Maybe by adding 
> another option to d.legend, like "display only the categories listed in the 
> first column of the 'colr/map file' )".

"d.legend -n ..." will only display categories which have labels.

Also, r.resample will only include those categories which are used in
the result map. Combining the two may achieve the desired result (at
the cost of duplicating the map).

Both of your suggestions for extensions seem plausible; you might
consider adding them to the request tracker in the "wish" category:

	http://grass.itc.it/bugtracking/wish.html

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




More information about the grass-user mailing list