[GRASS-SVN] r69184 - grass-addons/grass7/display/d.legend.vect
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 21 09:37:50 PDT 2016
Author: annakrat
Date: 2016-08-21 09:37:50 -0700 (Sun, 21 Aug 2016)
New Revision: 69184
Added:
grass-addons/grass7/display/d.legend.vect/d_legend_vect.png
grass-addons/grass7/display/d.legend.vect/d_legend_vect_subheadings.png
Removed:
grass-addons/grass7/display/d.legend.vect/d.legend.vect.png
Modified:
grass-addons/grass7/display/d.legend.vect/d.legend.vect.html
Log:
d.legend.vect: rewrite manual page
Modified: grass-addons/grass7/display/d.legend.vect/d.legend.vect.html
===================================================================
--- grass-addons/grass7/display/d.legend.vect/d.legend.vect.html 2016-08-21 16:31:37 UTC (rev 69183)
+++ grass-addons/grass7/display/d.legend.vect/d.legend.vect.html 2016-08-21 16:37:50 UTC (rev 69184)
@@ -1,51 +1,88 @@
<h2>DESCRIPTION</h2>
+Module <em>d.legend.vect</em> draws vector legend of currently displayed vector maps.
+<p>
+Parameter <b>at</b> defines the screen position of upper-left legend corner.
+Parameter <b>columns</b> defines the number of legend columns.
+User can specify a title of the legend using parameter <b>title</b>.
+The font of the title can be changed with <b>title_font</b>, <b>title_fontsize</b>.
+Flag <b>-b</b> is used to draw background of specified color (<b>bgcolor</b>),
+border color and border width (<b>border_color</b> and <b>border_width</b>).
+Parameter <b>symbol_size</b> defines the size of line and area symbols.
+The size of point symbols is based on currently set symbology of vector maps using
+<em><a href="d.vect.html">d.vect</a></em>.
+<p>Module <em>d.vect.legend</em> supports subtitles (see section Notes).
+Their font and font size can be set using parameters <b>sub_font</b>
+and <b>sub_fontsize</b>.
-<em>d.vect.legend</em> draws vector legend.
+<h3>Changing legend symbols and labels</h3>
+Symbols for vector areas and lines, and labels for individual vector labels
+can be changed in the symbology setting of each vector map in
+<em><a href="d.vect.html">d.vect</a></em> module (in Legend tab). Use its parameters
+<b>icon_area</b> and <b>icon_line</b> to pick from available symbols.
+By using parameter <b>legend_label</b> of <em>d.vect</em> module, users can change
+the default label, which is the map name.
+<h3>Modifying the order of legend entries and omitting certain vector maps
+from legend</h3>
+Module <em><a href="d.vect.html">d.vect</a></em> has a flag <b>-l</b>
+which when used removes the particular vector from vector legend.
+<p>The order of entries is defined by the order in Layer Manager (if used
+in GRASS GIS GUI). If that's not desired, one can export the legend file
+into a text file using parameter <b>output</b>, change the order of entries
+(see section Notes for format description) and then upload the modified file
+with parameter <b>input</b>.
+Parameter <b>output</b> defines path to the file where the internal legend
+file will be saved to, <b>input</b> defines the input file which
+the vector legend will be based on (input file must have correct format).
+
<h2>NOTES</h2>
+Module <em>d.legend.vect</em> draws vector legend based on legend file defined
+in shell environment variable GRASS_LEGEND_FILE.
+This file is automatically created and updated whenever
+<em><a href="d.vect.html">d.vect</a></em> command is used.
+User can create custom legend file and then use
+<em>export GRASS_LEGEND_FILE=path/to/file</em> in shell.
+GRASS GUI and MONITORS create the legend file automatically.
+By default the legend file is stored in grassdata/location/mapset/.tmp/user
+directory (in case of d.mon deeper in /monitor_name directory).<br>
<p>
-<em>d.vect.legend</em> draws vector legend based on legend file defined in ['GRASS_LEGEND_FILE']. This file is automatically created and updated whenever <em><a href="d.vect.html">d.vect</a></em> command used. User can create custom legend file and then use <em>export GRASS_LEGEND_FILE=path/to/file</em>.<br> Legend file has this format:<br>
-label|symbol_name|feature_color|fill_color|size|line_width|geometry_type|feature_count<br>
-By default the legend file is stored in grassdata/location/mapset/.tmp/user directory (in case of d.mon deeper in /monitor_name directory).<br>
-<p>
-Parameter <b>at</b> defines the screen position of upper-left legend corner. <b>columns</b> defines the number of legend columns.
-<p>
-Paramter <b>title</b> defines the title. User can use parameters <b>font, font_size, title_font, title_font_size, sub_font, sub_font_size</b> to set the font settings.
-<p>
-Flag <b>-b</b> shows the background and user can specify its properties with <b>border_color, bgcolor, border_width</b>
-<p>
-<b>symbol_size</b> defines the size of line and area symbols. The size of point symbols is defined in legend file via <em><a href="d.vect.html">d.vect</a></em> command.
-<p>
-<b>output</b> defines path to file where the internal legend file ['GRASS_LEGEND_FILE'] will be saved to. <b>input</b> defines the input file which the vector legend will be based on. This input file must have correct format.
+Legend file has this format:
+<pre>
+label|symbol_name|feature_color|fill_color|size|line_width|geometry_type|feature_count
+</pre>
+Here is an example of legend file with subtitles:
+<pre>
+Infrastructure|||||||
+major roads|legend/line|5|black|200:200:200|2|line|355
+bridges|extra/bridge|15|black|black|1|point|10938
+Hydrology|||||||
+streams|legend/line_crooked|5|30:144:255|200:200:200|3|line|8554
+water bodies|legend/area_curved|5|none|30:144:255|1|area|27764
+</pre>
+<img alt="Example of subheadings used in vector legend"
+ src="d_legend_vect_subheadings.png">
-
<h2>EXAMPLES</h2>
-
-<h3>Open monitor and add layers</h3>
-
+Open cairo monitor to render to file:
<div class="code"><pre>
+g.region vector=nc_state
d.mon cairo
-d.vect map=nc_state color=139:105:20 fill_color=227:227:186 width=3 icon_area=legend/area legend_label=state_boundary
-d.vect map=urbanarea color=0:128:0 fill_color=144:238:14 width=1 icon_area=legend/area2
-d.vect map=railroads color=232:146:34 width=2 icon_line=legend/line
-d.vect map=hospitals color=red fill_color=white icon=basic/cross2 size=10
+d.vect map=nc_state color=26:26:26 fill_color=229:229:229 width=2 legend_label="state boundaries"
+d.vect map=urbanarea color=none fill_color=127:127:127 width=1 legend_label="urban areas"
+d.vect map=railroads color=red width=1
+d.vect map=hospitals color=77:77:77 fill_color=0:187:0 width=1 icon=basic/cross3 size=10
+d.legend.vect -b at=2,40 title="Hospitals in North Carolina" symbol_size=26 fontsize=16 title_fontsize=20
</pre></div>
-<h3>Display legend</h3>
-<div class="code"><pre>
-d.legend.vect -b at=10,40 title="North Caroline" symbol_size=25
-</pre></div>
-
<center>
-<img src="d.legend.vect.png" alt="d.legend.vect example" border=1><br>
-Vector legend
+<img src="d_legend_vect.png" alt="d.legend.vect example"><br>
</center>
<h2>SEE ALSO</h2>
<em>
<a href="d.vect.html">d.vect</a>,
-<a href="d.legend.html">v.univar</a>
+<a href="d.legend.html">d.legend</a>
</em>
<p>
Deleted: grass-addons/grass7/display/d.legend.vect/d.legend.vect.png
===================================================================
(Binary files differ)
Added: grass-addons/grass7/display/d.legend.vect/d_legend_vect.png
===================================================================
(Binary files differ)
Property changes on: grass-addons/grass7/display/d.legend.vect/d_legend_vect.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: grass-addons/grass7/display/d.legend.vect/d_legend_vect_subheadings.png
===================================================================
(Binary files differ)
Property changes on: grass-addons/grass7/display/d.legend.vect/d_legend_vect_subheadings.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
More information about the grass-commit
mailing list