.TH d.mapgraph 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBd.mapgraph\fR\fR - Generates and displays simple graphics on map layers drawn in the active graphics monitor display frame. .SH KEYWORDS display, cartography .SH SYNOPSIS \fBd.mapgraph\fR .br \fBd.mapgraph help\fR .br \fBd.mapgraph\fR [\fBinput\fR=\fIstring\fR] [\fBcolor\fR=\fIstring\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Parameters: .IP "\fBinput\fR=\fIstring\fR" 4m .br Unix file containg graphing instructions, if not given reads from standard input .IP "\fBcolor\fR=\fIstring\fR" 4m .br Color to draw with, either a standard GRASS color or R:G:B triplet (separated by colons) .br Default: \fIblack\fR .PP .SS This module is superseded and scheduled for demolition. .br Please use "\fId.graph \fB-m\fR\fR" instead. .SH DESCRIPTION \fId.mapgraph\fR draws graphics that are described in standard input (default) or the UNIX input file \fIname\fR. If commands are entered via standard input, a \fIctrl-d\fR is used to signal the end of input to \fId.mapgraph\fR. This program performs essentially the same function as \fId.graph\fR; however, point locations are specified to \fId.mapgraph\fR in the geographic coordinate system of the user's current mapset and location (i.e., in map coordinates), rather than in graphics display screen coordinates. .PP The program can be run interactively or non-interactively. The user can run the program completely non-interactively by specifying the name of a file containing \fId.mapgraph\fR graphics commands and the values of all needed parameters on the command line. The user can instead elect to run the program partially interactively, by specifying any/all of the parameters \fIexcept\fR the graphics \fBinput=\fR\fIname\fR parameter on the command line. In this case, \fId.mapgraph\fR will expect the user to input \fId.mapgraph\fR graphics commands from standard input (i.e., the keyboard) and will (silently) prompt the user for these graphics commands. Alternately, the user can simply type \fBd.mapgraph\fR on the command line, and be prompted for the values of all parameters (the user can still input graphics commands from an input file using this form.) In this case, the user is presented with the standard GRASS \fIg.parser\fR interface. .PP \fId.mapgraph\fR is used for drawing simple graphics on top of map layers. The coordinate system used by \fId.mapgraph\fR is the same as that of the map layer displayed in the active display frame on the graphics monitor (or that of the user's current region, if no map is displayed). .PP The graphics language is simple and uses the following commands: .IP "\fB#\fR \fIcomment\fR .br A line of comment which is ignored in the processing. .IP "\fBmove\fR \fIxpos ypos\fR .br The current location is updated to \fIxpos ypos\fR (where these, respectively, are the easting and northing of geographic coordinates stated in the map coordinate system of the user's current GRASS location, falling within the current region and active frame). If unspecified by the user, the current location becomes (0,0). If, as most likely, the point (0,0) falls outside of the user's current region, graphics drawn there will not appear in the graphics frame. .PP Note: use \fIg.region\fR to obtain the coordinates of current location. Use \fI d.where\fR to obtain specific map coordinates of various points on the raster map displayed in the active frame. .br Note: there must be a space between \fIxpos\fR and \fIypos\fR. .IP "\fBdraw\fR \fIxpos ypos\fR .br A line is drawn in the current color from the current location to the new location \fIxpos ypos\fR, which then becomes the current location. \fIxpos\fR and \fIypos\fR are (respectively) an easting and northing stated in the map coordinate system of the user's current GRASS location, and located within the user's current geographic region and active frame. .PP Note: there must be a space between \fIxpos\fR and \fIypos\fR. .IP "\fBcolor\fR \fIcolor\fR .br Sets the current color to that stated. Color options are: \fIred\fR, \fIorange\fR, \fIyellow\fR, \fIgreen\fR, \fIblue\fR, \fIindigo\fR, \fIviolet\fR, \fImagenta,\fR \fIbrown\fR, \fIgray\fR, \fIwhite\fR, \fIblack\fR, an R:G:B triplet (separated by colons), or the word "none" (draws in the default background color). .IP "\fBsize\fR \fIxper yper\fR .br Subsequent text will be drawn such that the text is \fIxper\fR percent of the display frame's width and \fIyper\fR percent of the display frame height. If not specified by the user, the text size becomes 5 percent of the active frame's width and 5 percent of the frame's height. This is equivalent to entering \fBsize 5 5\fR. .IP "\fBtext\fR \fIline-of-text\fR .br The stated text is drawn at the current location using the current color and the current size. .IP "\fBicon\fR \fItype size x y\fR .br Draws an icon of types o, x, or + with specified size at location x,y. Note: type o designates a square. .IP "\fBpolygon\fR .br \fI xpos ypos\fR .br \fI xpos ypos\fR .br . .br . .br . .br .br The map coordinates appearing on lines beneath the word \fIpolygon\fR, one pair per line, circumscribe a polygon which is to be filled with the current color. .PP .SH NOTES \fId.mapgraph\fR is identical to the \fId.graph\fR command, except for the difference in coordinate systems used. In the future functionality will be merged into \fId.graph\fR and \fId.mapgraph\fR will be removed. .PP \fId.mapgraph\fR will complain if the user enters something to standard input that it does not understand. Blank lines in the input file will result in this error message. .SH EXAMPLE Draw some text in the center of the display: \fC .DS .br EAST=\(gag.region \-c | grep east | cut \-f2 \-d:\(ga .br NORTH=\(gag.region \-c | grep north | cut \-f2 \-d:\(ga .br .br d.mapgraph << EOF .br move $EAST $NORTH .br text GRASS .br EOF .br .DE \fR .SH SEE ALSO \fId.frame\fR .br \fId.graph\fR .br \fId.rast\fR .br \fId.zoom\fR .br \fIg.region\fR .SH AUTHOR James Westervelt, U.S. Army Construction Engineering Research Laboratory .PP \fILast changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team