NAME
d.legend - Displays a legend for a raster map layer in the
active frame on the graphics monitor.
(GRASS Display Program)
SYNOPSIS
d.legend
d.legend help
d.legend [-vcsom] map=name [color=name]
[lines=value] [thin=value] [labelnum=value]
[maxfontsize=value]
DESCRIPTION
d.legend displays a legend for a user-specified
raster map layer in the active frame on the graphics
monitor. The legend's size is based on the height of the
active frame. The user should therefore take care to
create a display frame of suitable dimensions before
running d.legend. d.legend will only
obscure those portions of the active frame that directly
underlie the legend.
The user can run d.legend either non-interactively
or interactively. If the user specifies the name of a
raster map layer on the command line, the program
will run non-interactively. Default legend text
color and number of lines will be used
unless the user specifies other values on the command
line.
Alternately, the user can simply type d.legend on the command line;
in this case, the program will prompt the user for parameter values
using the standard GRASS parser interface.
OPTIONS
Flags:
- -v
- Do not show category labels
- -c
- Do not show category numbers
- -s
- Draw smooth gradient (for floating point rasters forced automatically)
- -o
- Draw entries only for existing categories (ignored for floating point maps)
- -m
- Use mouse to size & place legend
Parameters:
map
Name of raster map.
color
Sets the legend's text color.
Options: red, orange, yellow, green, blue, indigo, white, black, brown, magenta, aqua, gray, grey
Default: white
lines
Number of text lines (useful for truncating long legends)
Options: 0-1000
Default: 0
thin
Thinning factor (thin=10 gives cats 0,10,20...)
Options: 0-1000
Default: 1
labelnum
Number of labels for legend description
Options: 2-100
Default: 5
maxfontsize
Max font size for text labels
Options: 0-1000
Default: 20
NOTE
Note that when using the mouse to size & place the legend, if you
make a horizontal box the values run from left to right and no category
values are printed (you may want to use d.label for that).
If the user attempts to display a very long legend in a relatively short
display frame, the legend may appear in unreadably small text.
The flag -o is useful for categorial maps, it suppresses the
drawing of non-existing categories (otherwise the full range is shown).
Font size for text labels may be adjusted with maxfontsize
parameter.
SEE ALSO
d.colormode
d.colors
d.colortable
d.display
d.erase
d.grid
d.rast
d.rast.labels
d.vect
d.what.rast
r.reclass
parser
AUTHORS
Bill Brown, U.S. Army Construction Engineering Research Laboratories
Improvements from various authors
Last changed: $Date: 2002/08/14 08:33:59 $