~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to display/d.legend/description.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<h2>DESCRIPTION</h2>
2
 
 
3
 
<em>d.legend</em> displays a legend for a user-specified
4
 
raster map layer in the active frame on the graphics
5
 
monitor.  
6
 
<p>
7
 
 
8
 
The user can run <em>d.legend</em> either non-interactively
9
 
or interactively.  If the user specifies the name of a
10
 
raster <b>map</b> layer on the command line, the program
11
 
will run non-interactively.  Default legend text
12
 
<b>color</b> and position will be used unless
13
 
the user specifies other values on the command line.
14
 
 
15
 
<p>
16
 
 
17
 
Alternately, the user can simply type <b>d.legend</b> on the command line; 
18
 
in this case, the program will prompt the user for parameter values 
19
 
using the standard GRASS GUI interface.
20
 
 
21
 
<h2>NOTES</h2>
22
 
 
23
 
The legend's default size is based on the dimensions of the
24
 
active frame, specifically its height.  <em>d.legend</em> will only
25
 
obscure those portions of the active frame that directly underlie the legend.
26
 
<p>
27
 
When using the mouse or <b>at</b> to size &amp; place the legend, a user may
28
 
create a horizontal legend by making the box wider than it is tall.
29
 
<p>
30
 
Raster maps based on floating point values will display smoothed, from greatest
31
 
to smallest value, while categorial raster maps will display in order, from
32
 
top to bottom. Horizontal legends will always be smoothed. If the box is defined
33
 
with inverted y-values or an inverted <b>range</b>, the legend will automatically
34
 
flip. If this is not the desired result, the <b>-f</b> flag may be used to flip
35
 
it back.
36
 
<p>
37
 
If the user attempts to display a very long legend in a relatively short 
38
 
display frame, the legend may appear in unreadably small text, or even revert
39
 
to a smooth gradient legend. Use the <b>lines</b>, <b>thin</b>, <b>use</b>, <b>range</b>,
40
 
and/or <b>-n</b> options to reduce the number of categories to be displayed,
41
 
or the <b>-s</b> flag to force a smooth gradient legend.
42
 
<p>
43
 
The <b>lines</b> option will display the first number of categories, as defined
44
 
by <em>value</em>, contained in the raster map. When used with the <b>-n</b> flag,
45
 
it takes on a new meaning: "up to category #". When used with both
46
 
<b>thin</b> and the <b>-n</b> flag, its meaning becomes more obscure. When
47
 
using <b>lines</b>, auto-scaled text similar to "4 of 16 categories" will be placed at 
48
 
the bottom of the legend.
49
 
<p>
50
 
The <b>thin</b> option sets the thinning factor. For raster maps with a 0th
51
 
category, <b>thin=</b><em>10</em> gives cats [0,10,20,...]. For raster maps 
52
 
starting at category 1, <b>thin=</b><em>10</em> gives cats [1,11,21,...].
53
 
<p>
54
 
The <b>use</b> option lets the user create a legend made up of arbitrary category
55
 
values. e.g.&nbsp;<b>use=</b><em>1000,100,10,0,-10,-100,-1000</em>
56
 
<p>
57
 
The <b>range</b> option lets the user define the minimum and maximum categories
58
 
to be used in the legend. It may also be used to define the limits of a smooth
59
 
gradient legend created from a raster containing floating point values. Note
60
 
the color scale will remain faithful to the category values as defined with
61
 
<em><a href="r.colors.html">r.colors</a></em>, and the <b>range</b> may be
62
 
extended to the limits defined by the <em><a href="r.colors.html">r.colors</a></em>
63
 
color map.
64
 
<p>
65
 
The flag <b>-n</b> is useful for categorial maps, as it suppresses the
66
 
drawing of non-existing categories (otherwise the full range is shown).
67
 
<p>
68
 
Vertical legends produced with <em>d.legend</em> will place text labels to the
69
 
right of the legend box, horizontal legends will place text below. This text
70
 
will be auto-scaled to fit within the frame, reducing the size of the legend
71
 
if necessary. Legends positioned with the mouse or with the <b>at</b> option
72
 
will not auto-scale text, in order to provide more control to the user.
73
 
Smaller text may be obtained in this case by reducing the
74
 
height of the box. The <b>-c</b> and <b>-v</b> flags may be used to suppress the
75
 
display of category numbers and labels respectively, or used together to 
76
 
suppress all text of categorial raster maps.
77
 
<p>
78
 
The text produced from floating-point raster maps will automatically create
79
 
output with a meaningful number of significant digits. For very small values,
80
 
numbers will be expressed in scientific notation, e.g.&nbsp;"1.7e-9".
81
 
<p>
82
 
Legends placed with the mouse are not saved to the display window's history
83
 
for automatic redraw. By setting the Debug level to 1 (see 
84
 
<em><a href="g.gisenv.html">g.gisenv</a></em>) the corresponding <b>at</b>
85
 
setting can be determined.
86
 
<p>
87
 
Note that old scripts which relied on setting <b>lines</b> greater than the
88
 
number of categories to scale the legend may no longer produce the desired
89
 
output, although the auto-scaling should still produce something that looks 
90
 
good in this case.
91
 
 
92
 
 
93
 
<h2>SEE ALSO</h2>
94
 
 
95
 
<em><a href="d.barscale.html">d.barscale</a></em><br>
96
 
<em><a href="d.colors.html">d.colors</a></em><br>
97
 
<em><a href="d.colortable.html">d.colortable</a></em><br>
98
 
<em><a href="d.erase.html">d.erase</a></em><br>
99
 
<em><a href="d.font.html">d.font</a></em><br>
100
 
<em><a href="d.font.freetype.html">d.font.freetype</a></em><br>
101
 
<em><a href="d.grid.html">d.grid</a></em><br>
102
 
<em><a href="d.rast.html">d.rast</a></em><br>
103
 
<!-- <em><a href="d.rast.labels.html">d.rast.labels</a></em><br> -->
104
 
<em><a href="d.rast.leg.html">d.rast.leg</a></em><br>
105
 
<em><a href="d.text.html">d.text</a></em><br>
106
 
<em><a href="d.text.freetype.html">d.text.freetype</a></em><br>
107
 
<em><a href="d.vect.thematic.html">d.vect.thematic</a></em><br>
108
 
<em><a href="d.what.rast.html">d.what.rast</a></em><br>
109
 
<em><a href="g.gisenv.html">g.gisenv</a></em><br>
110
 
<em><a href="r.reclass.html">r.reclass</a></em><br>
111
 
 
112
 
 
113
 
<h2>AUTHORS</h2>
114
 
Bill Brown, U.S. Army Construction Engineering Research Laboratories
115
 
<br>Late 2002: Rewrite of much of the code. Hamish Bowman,
116
 
 Otago University, New Zealand
117
 
<br>Additional improvements from various authors
118
 
 
119
 
<p><i>Last changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $</i>