## 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 [-vcsm] map=name [color=name] [lines=value] [thin=value] [labelnum=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)
-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

  ## 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.

  ## 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/01/25 05:45:33 $