<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>d.rast.leg.py - GRASS GIS manual</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="grassdocs.css" type="text/css">
</head>
<body bgcolor="white">
<div id="container">

<a href="index.html"><img src="grass_logo.png" alt="GRASS logo"></a>
<hr class="header">

<h2>NAME</h2>
<em><b>d.rast.leg.py</b></em>  - Displays a raster map and its legend on a graphics window
<h2>KEYWORDS</h2>
<a href="display.html">display</a>, <a href="topic_cartography.html">cartography</a>, <a href="keywords.html#legend">legend</a>
<h2>SYNOPSIS</h2>
<div id="name"><b>d.rast.leg.py</b><br></div>
<b>d.rast.leg.py --help</b><br>
<div id="synopsis"><b>d.rast.leg.py</b> [-<b>fns</b>] <b>map</b>=<em>name</em>  [<b>lines</b>=<em>integer</em>]   [<b>raster</b>=<em>name</em>]   [--<b>help</b>]  [--<b>verbose</b>]  [--<b>quiet</b>]  [--<b>ui</b>] 
</div>

<div id="flags">
<h3>Flags:</h3>
<dl>
<dt><b>-f</b></dt>
<dd>Flip legend</dd>

<dt><b>-n</b></dt>
<dd>Omit entries with missing label</dd>

<dt><b>-s</b></dt>
<dd>Draw smooth gradient</dd>

<dt><b>--help</b></dt>
<dd>Print usage summary</dd>
<dt><b>--verbose</b></dt>
<dd>Verbose module output</dd>
<dt><b>--quiet</b></dt>
<dd>Quiet module output</dd>
<dt><b>--ui</b></dt>
<dd>Force launching GUI dialog</dd>
</dl>
</div>

<div id="parameters">
<h3>Parameters:</h3>
<dl>
<dt><b>map</b>=<em>name</em>&nbsp;<b>[required]</b></dt>
<dd>Name of raster map to display</dd>

<dt><b>lines</b>=<em>integer</em></dt>
<dd>Number of lines to appear in the legend</dd>

<dt><b>raster</b>=<em>name</em></dt>
<dd>Name of input raster map to generate legend from</dd>

</dl>
</div>
<div class="toc">
<h4 class="toc">Table of contents</h4>
<ul class="toc">
    <li class="toc"><a href="#description" class="toc">DESCRIPTION</a></li>
    <li class="toc"><a href="#notes" class="toc">NOTES</a></li>
    <li class="toc"><a href="#example" class="toc">EXAMPLE</a></li>
    <li class="toc"><a href="#see-also" class="toc">SEE ALSO</a></li>
    <li class="toc"><a href="#authors" class="toc">AUTHORS</a></li>
</ul>
</div>
<h2><a name="description">DESCRIPTION</a></h2>

<em>d.rast.leg</em> shows a raster map along with its legend.
It first clears the entire screen, then divides it 
into a main (left) and a minor (right) frames, and displays a raster 
map in the main frame and the map legend in the minor frame. The main
frame remains active when the program finishes.

<h2><a name="notes">NOTES</a></h2>

The legend may be flipped with the <b>-f</b> flag.
<p>If the <b>lines</b> parameter is not given then the legend frame will 
display as many lines as number of categories in the map, otherwise, it 
will display the first <b>lines</b> minus 1 categories with the
rest being truncated.
<p>The user may adjust the <b>lines</b> parameter or
the size of graphics window to get an appropriate result.

<p>The user may specify a second raster map with the <b>raster</b> parameter from
which the legend is generated. This is useful to visualize (time) series of
raster maps with a common static legend instead of the default dynamic legend.
<p>To remove all frames when clearing the display, use
<tt>d.erase -f</tt>.

<h2><a name="example">EXAMPLE</a></h2>

In this example, the polar diagram of the 'aspect' angle map in the
North Carolina sample dataset location is generated:

<div class="code"><pre>
g.region raster=landclass96 -p
d.rast.leg landclass96
</pre></div>

<h2><a name="see-also">SEE ALSO</a></h2>

<em>
<a href="d.legend.html">d.legend</a>,
<a href="d.erase.html">d.erase</a>,
<a href="d.rast.html">d.rast</a>
</em>

<h2><a name="authors">AUTHORS</a></h2>

Jianping Xu, Scott Madry, Rutgers University<br>
Markus Neteler

<!--
<p>
<i>Last changed: $Date$</i>
--><h2>SOURCE CODE</h2>
<p>Available at: <a href="https://github.com/OSGeo/grass/tree/master/scripts/d.rast.leg">d.rast.leg source code</a> (<a href="https://github.com/OSGeo/grass/commits/master/scripts/d.rast.leg">history</a>)</p>
<hr class="header">
<p>
<a href="index.html">Main index</a> |
<a href="display.html">Display index</a> |
<a href="topics.html">Topics index</a> |
<a href="keywords.html">Keywords index</a> |
<a href="graphical_index.html">Graphical index</a> |
<a href="full_index.html">Full index</a>
</p>
<p>
&copy; 2003-2020
<a href="http://grass.osgeo.org">GRASS Development Team</a>,
GRASS GIS 7.8.3 Reference Manual
</p>

</div>
</body>
</html>