1d.mapgraph(1)                 Grass User's Manual                d.mapgraph(1)
2
3
4

NAME

6       d.mapgraph   -  Generates  and  displays  simple graphics on map layers
7       drawn in the active graphics monitor display frame.
8

KEYWORDS

10       display
11

SYNOPSIS

13       d.mapgraph
14       d.mapgraph help
15       d.mapgraph  [input=string]   [color=string]   [--verbose]  [--quiet]
16
17   Parameters:
18       input=string
19           Unix file containg graphing instructions, if not given  reads  from
20           standard input
21
22       color=string
23           Color  to draw with, either a standard GRASS color or R:G:B triplet
24           (separated by colons)
25           Default: black
26
27   This module is superseded and scheduled for demolition.
28       Please use "d.graph -m" instead.
29

DESCRIPTION

31       d.mapgraph  draws  graphics  that  are  described  in  standard   input
32       (default)  or  the  UNIX  input  file name. If commands are entered via
33       standard input, a ctrl-d is used to signal the end of input  to  d.map‐
34       graph.  This program performs essentially the same function as d.graph;
35       however, point locations are specified to d.mapgraph in the  geographic
36       coordinate  system  of the user's current mapset and location (i.e., in
37       map coordinates), rather than in graphics display screen coordinates.
38
39       The program can be run interactively or  non-interactively.   The  user
40       can run the program completely non-interactively by specifying the name
41       of a file containing d.mapgraph graphics commands and the values of all
42       needed  parameters  on the command line.  The user can instead elect to
43       run the program partially interactively, by specifying any/all  of  the
44       parameters  except  the  graphics  input=name  parameter on the command
45       line.  In this case, d.mapgraph will expect the user  to  input  d.map‐
46       graph  graphics  commands  from standard input (i.e., the keyboard) and
47       will (silently) prompt the user for these  graphics  commands.   Alter‐
48       nately, the user can simply type d.mapgraph on the command line, and be
49       prompted for the values of all parameters (the  user  can  still  input
50       graphics  commands  from  an input file using this form.) In this case,
51       the user is presented with the standard GRASS parser interface.
52
53       d.mapgraph is used for drawing simple graphics on top  of  map  layers.
54       The coordinate system used by d.mapgraph is the same as that of the map
55       layer displayed in the active display frame on the graphics monitor (or
56       that of the user's current region, if no map is displayed).
57
58       The graphics language is simple and uses the following commands:
59
60       # comment
61              A line of comment which is ignored in the processing.
62
63       move xpos ypos
64              The  current  location  is  updated  to  xpos ypos (where these,
65              respectively, are the easting and northing of geographic coordi‐
66              nates  stated in the map coordinate system of the user's current
67              GRASS location, falling within the  current  region  and  active
68              frame).   If  unspecified  by  the  user,  the  current location
69              becomes (0,0).  If, as most likely, the point (0,0)  falls  out‐
70              side of the user's current region, graphics drawn there will not
71              appear in the graphics frame.
72
73       Note: use g.region to obtain the coordinates of current location.   Use
74       d.where  to  obtain  specific  map coordinates of various points on the
75       raster map displayed in the active frame.
76       Note: there must be a space between xpos and ypos.
77
78       draw xpos ypos
79              A line is drawn in the current color from the  current  location
80              to  the  new  location xpos ypos, which then becomes the current
81              location.  xpos and ypos are (respectively) an easting and  nor‐
82              thing  stated in the map coordinate system of the user's current
83              GRASS location, and located within the user's current geographic
84              region and active frame.
85
86       Note: there must be a space between xpos and ypos.
87
88       color color
89              Sets  the current color to that stated.  Color options are: red,
90              orange, yellow, green, blue,  indigo,  violet,  magenta,  brown,
91              gray,  white,  black, an R:G:B triplet (separated by colons), or
92              the word "none" (draws in the default background color).
93
94       size xper yper
95              Subsequent text will be drawn such that the text is xper percent
96              of  the  display  frame's  width and yper percent of the display
97              frame height.  If not specified  by  the  user,  the  text  size
98              becomes  5  percent of the active frame's width and 5 percent of
99              the frame's height.  This is equivalent to entering size 5 5.
100
101       text line-of-text
102              The stated text is drawn at the current location using the  cur‐
103              rent color and the current size.
104
105       icon type size x y
106              Draws  an  icon of types o, x, or + with specified size at loca‐
107              tion x,y.  Note: type o designates a square.
108
109       polygon
110               xpos ypos
111               xpos ypos
112              The map coordinates appearing on lines beneath the word polygon,
113              one  pair per line, circumscribe a polygon which is to be filled
114              with the current color.
115

NOTES

117       d.mapgraph is identical to the d.graph command, except for the  differ‐
118       ence  in  coordinate  systems used. In the future functionality will be
119       merged into d.graph and d.mapgraph will be removed.
120
121       d.mapgraph will complain if the user enters something to standard input
122       that it does not understand.  Blank lines in the input file will result
123       in this error message.
124

EXAMPLE

126       Draw some text in the center of the display:
127          EAST=`g.region -c | grep east | cut -f2 -d:`
128          NORTH=`g.region -c | grep north | cut -f2 -d:`
129          d.mapgraph << EOF
130            move $EAST $NORTH
131            text GRASS
132          EOF
133
134

SEE ALSO

136       d.frame
137       d.graph
138       d.rast
139       d.zoom
140       g.region
141

AUTHOR

143       James Westervelt, U.S. Army Construction Engineering  Research  Labora‐
144       tory
145
146       Last changed: $Date: 2005-12-16 02:11:27 +0100 (Fri, 16 Dec 2005) $
147
148       Full index
149
150       © 2003-2008 GRASS Development Team
151
152
153
154GRASS 6.3.0                                                      d.mapgraph(1)
Impressum