d.legend.vect(1grass)


NAME

   d.legend.vect  - Displays a vector legend in the active graphics frame.

KEYWORDS

   display, cartography, vector, legend

SYNOPSIS

   d.legend.vect
   d.legend.vect --help
   d.legend.vect  [-b]  [at=left,top]   [columns=integer]   [title=string]
   [symbol_size=integer]        [border_color=name]         [bgcolor=name]
   [border_width=integer]          [font=string]          [fontsize=float]
   [title_font=string]      [title_fontsize=float]       [sub_font=string]
   [sub_fontsize=float]       [fontcolor=name]       [separator=character]
   [input=name]    [output=name]    [--overwrite]   [--help]   [--verbose]
   [--quiet]  [--ui]

   Flags:
   -b
       Display legend background

   --overwrite
       Allow output files to overwrite existing files

   --help
       Print usage summary

   --verbose
       Verbose module output

   --quiet
       Quiet module output

   --ui
       Force launching GUI dialog

   Parameters:
   at=left,top
       Screen  position  of legend to be drawn (percentage, [0,0] is lower
       left)
       Options: 0-100
       Default: 10,40

   columns=integer
       Number of legend columns
       Default: 1

   title=string
       Legend title

   symbol_size=integer
       Symbol size
       Default: 20

   border_color=name
       Border color
       Either a standard color name, R:G:B triplet, or "none"
       Default: black

   bgcolor=name
       Background color
       Either a standard color name, R:G:B triplet, or "none"
       Default: white

   border_width=integer
       Background border width
       Default: 2

   font=string
       Font name

   fontsize=float
       Font size
       Default: 12
       Options: 1-360

   title_font=string
       Title font name

   title_fontsize=float
       Title font size
       Default: 18
       Options: 1-360

   sub_font=string
       Subtitle font name

   sub_fontsize=float
       Subtitle font size
       Default: 14
       Options: 1-360

   fontcolor=name
       Font color
       Either a standard color name or R:G:B triplet
       Default: black

   separator=character
       Field separator for input file
       Special characters: pipe, comma, space, tab, newline
       Default: pipe

   input=name
       Input legend file
       Path to legend file

   output=name
       Output csv file
       Path to output file or '-' for standard output

DESCRIPTION

   Module d.legend.vect draws vector legend of currently displayed  vector
   maps.

   Parameter  at  defines the screen position of upper-left legend corner.
   Parameter columns defines the  number  of  legend  columns.   User  can
   specify  a  title of the legend using parameter title.  The font of the
   title can be changed with title_font, title_fontsize.  Flag -b is  used
   to  draw  background  of  specified  color  (bgcolor), border color and
   border width (border_color and  border_width).   Parameter  symbol_size
   defines  the  size of line and area symbols.  The size of point symbols
   is based on currently set symbology of  vector  maps  using  d.vect  or
   d.vect.thematic.

   Module  d.vect.legend  supports  subtitles  (see section Notes).  Their
   font  and  font  size  can  be  set  using  parameters   sub_font   and
   sub_fontsize.

   Changing legend symbols and labels
   Symbols  for  vector  areas and lines, and labels for individual vector
   labels can be changed in the symbology setting of each  vector  map  in
   d.vect  or  d.vect.thematic  module (in Legend tab). Use its parameters
   icon_area and icon_line to  pick  from  available  symbols.   By  using
   parameter  legend_label  of d.vect module, users can change the default
   label, which is the map name.

   Modifying the order of legend entries and omitting certain vector maps
   from legend Modules d.vect and d.vect.thematic have  a  flag  -s  which
   removes the particular vector or thematic vector from vector legend.

   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 output, change the order of
   entries (see section Notes for format description) and then upload  the
   modified  file  with parameter input.  Parameter output defines path to
   the file where the internal legend file will be saved to, input defines
   the  input  file  which  the vector legend will be based on (input file
   must have correct format).

NOTES

   Module d.legend.vect draws vector legend based on legend  file  defined
   in   shell   environment  variable  GRASS_LEGEND_FILE.   This  file  is
   automatically created and updated  whenever  d.vect  command  is  used.
   User   can   create   custom   legend   file   and   then   use  export
   GRASS_LEGEND_FILE=path/to/file 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).

   Legend file has this format:
   label|symbol_name|size|color_type|feature_color|fill_color|line_width|geometry_type|feature_count
   Color  type  can be 'lf' or 'ps'. Based on color type color columns are
   interpreted as  line  color  and  fill  colors  (lf),  or  primary  and
   secondary   colors   (ps).    Module   d.vect   always  uses  'lf'  and
   d.vect.thematic  'ps'.   Here  is  an  example  of  legend  file   with
   subtitles:
   Infrastructure||||||||
   major roads|legend/line|5|lf|black|200:200:200|2|line|355
   bridges|extra/bridge|15|lf|black|black|1|point|10938
   Hydrology||||||||
   streams|legend/line_crooked|5|lf|30:144:255|200:200:200|3|line|8554
   water bodies|legend/area_curved|5|lf|none|30:144:255|1|area|27764

EXAMPLES

   Open cairo monitor to render to file:
   g.region vector=nc_state
   d.mon cairo
   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

SEE ALSO

    d.vect, d.vect.thematic, d.legend

   Check also Python module from AddOns: d.vect.thematic2

AUTHOR

   Adam  Laza,  during  GSoC  2016 Mentors: Anna Petrasova, Vaclav Petras,
   Martin Landa

   Last changed: $Date: 2016-10-16 05:22:49 +0200 (Sun, 16 Oct 2016) $

SOURCE CODE

   Available at: d.legend.vect source code (history)

   Main index | Display index | Topics index | Keywords index |  Graphical
   index | Full index

    2003-2016 GRASS Development Team, GRASS GIS 7.2.0 Reference Manual





Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.