1d.mapgraph(1) Grass User's Manual d.mapgraph(1)
2
3
4
6 d.mapgraph - Generates and displays simple graphics on map layers
7 drawn in the active graphics monitor display frame.
8
10 display
11
13 d.mapgraph
14 d.mapgraph help
15 d.mapgraph [input=string] [color=string]
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) Default: black
25
26 This module is superseded and scheduled for demolition.
27 Please use "d.graph -m" instead.
28
30 d.mapgraph draws graphics that are described in standard input
31 (default) or the UNIX input file name. If commands are entered via
32 standard input, a ctrl-d is used to signal the end of input to d.map‐
33 graph. This program performs essentially the same function as d.graph;
34 however, point locations are specified to d.mapgraph in the geographic
35 coordinate system of the user's current mapset and location (i.e., in
36 map coordinates), rather than in graphics display screen coordinates.
37
38 The program can be run interactively or non-interactively. The user
39 can run the program completely non-interactively by specifying the name
40 of a file containing d.mapgraph graphics commands and the values of all
41 needed parameters on the command line. The user can instead elect to
42 run the program partially interactively, by specifying any/all of the
43 parameters except the graphics input=name parameter on the command
44 line. In this case, d.mapgraph will expect the user to input d.map‐
45 graph graphics commands from standard input (i.e., the keyboard) and
46 will (silently) prompt the user for these graphics commands. Alter‐
47 nately, the user can simply type d.mapgraph on the command line, and be
48 prompted for the values of all parameters (the user can still input
49 graphics commands from an input file using this form.) In this case,
50 the user is presented with the standard GRASS parser interface.
51
52 d.mapgraph is used for drawing simple graphics on top of map layers.
53 The coordinate system used by d.mapgraph is the same as that of the map
54 layer displayed in the active display frame on the graphics monitor (or
55 that of the user's current region, if no map is displayed).
56
57 The graphics language is simple and uses the following commands:
58
59 # comment
60 A line of comment which is ignored in the processing.
61
62 move xpos ypos
63 The current location is updated to xpos ypos (where these,
64 respectively, are the easting and northing of geographic coordi‐
65 nates stated in the map coordinate system of the user's current
66 GRASS location, falling within the current region and active
67 frame). If unspecified by the user, the current location
68 becomes (0,0). If, as most likely, the point (0,0) falls out‐
69 side of the user's current region, graphics drawn there will not
70 appear in the graphics frame.
71
72 Note: use g.region to obtain the coordinates of current location. Use
73 d.where to obtain specific map coordinates of various points on the
74 raster map displayed in the active frame.
75 Note: there must be a space between xpos and ypos.
76
77 draw xpos ypos
78 A line is drawn in the current color from the current location
79 to the new location xpos ypos, which then becomes the current
80 location. xpos and ypos are (respectively) an easting and nor‐
81 thing stated in the map coordinate system of the user's current
82 GRASS location, and located within the user's current geographic
83 region and active frame.
84
85 Note: there must be a space between xpos and ypos.
86
87 color color
88 Sets the current color to that stated. Color options are: red,
89 orange, yellow, green, blue, indigo, violet, magenta, brown,
90 gray, white, black, an R:G:B triplet (separated by colons), or
91 the word "none" (draws in the default background color).
92
93 size xper yper
94 Subsequent text will be drawn such that the text is xper percent
95 of the display frame's width and yper percent of the display
96 frame height. If not specified by the user, the text size
97 becomes 5 percent of the active frame's width and 5 percent of
98 the frame's height. This is equivalent to entering size 5 5.
99
100 text line-of-text
101 The stated text is drawn at the current location using the cur‐
102 rent color and the current size.
103
104 icon type size x y
105 Draws an icon of types o, x, or + with specified size at loca‐
106 tion x,y. Note: type o designates a square.
107
108 polygon
109 xpos ypos
110 xpos ypos
111 The map coordinates appearing on lines beneath the word polygon,
112 one pair per line, circumscribe a polygon which is to be filled
113 with the current color.
114
116 d.mapgraph is identical to the d.graph command, except for the differ‐
117 ence in coordinate systems used. In the future functionality will be
118 merged into d.graph and d.mapgraph will be removed.
119
120 d.mapgraph will complain if the user enters something to standard input
121 that it does not understand. Blank lines in the input file will result
122 in this error message.
123
125 Draw some text in the center of the display:
126 EAST=`g.region -c | grep east | cut -f2 -d:`
127 NORTH=`g.region -c | grep north | cut -f2 -d:`
128 d.mapgraph << EOF
129 move $EAST $NORTH
130 text GRASS
131 EOF
132
133
135 d.frame
136 d.graph
137 d.rast
138 d.zoom
139 g.region
140
142 James Westervelt, U.S. Army Construction Engineering Research Labora‐
143 tory
144
145 Last changed: $Date: 2005/12/16 01:11:27 $
146
147 Full index
148
149
150
151GRASS 6.2.2 d.mapgraph(1)