d.graph(1)		      Grass User's Manual		    d.graph(1)



NNAAMMEE
       dd..ggrraapphh	- Program for generating and displaying simple graphics to the
       graphics display monitor.
       _(_G_R_A_S_S _D_i_s_p_l_a_y _P_r_o_g_r_a_m_)

SSYYNNOOPPSSIISS
       dd..ggrraapphh
       dd..ggrraapphh hheellpp
       dd..ggrraapphh [iinnppuutt==_n_a_m_e] [ccoolloorr==_n_a_m_e]

DDEESSCCRRIIPPTTIIOONN
       _d_._g_r_a_p_h draws graphics that are described either  from  standard  input
       (default), or within a file (if an input _f_i_l_e name is identified on the
       command line). If graphics commands are entered from standard input,  a
       _c_t_r_l_-_d is used to signal the end of input to _d_._g_r_a_p_h.


       The  program  can  be run interactively or non-interactively.  The user
       can run the program completely non-interactively by specifying the name
       of  a graphics _f_i_l_e containing _d_._g_r_a_p_h 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 _e_x_c_e_p_t the graphics ffiillee==_n_a_m_e parameter on  the  com-
       mand line.  In this case, _d_._g_r_a_p_h will expect the user to input _d_._g_r_a_p_h
       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 dd..ggrraapphh on the command line, and
       be prompted for the values of all parameters (the user can still  input
       graphics  commands  from  either  an input file or standard input using
       this form). In this case, the user is presented with the standard GRASS
       _p_a_r_s_e_r interface.



   PPaarraammeetteerrss::
       ffiillee==_n_a_m_e
	      Name  of	file containing graphics commands. This is a UNIX file
	      name; the file must be located in  the  user's  current  working
	      directory or be specified by its full path name.	If no filename
	      is specified commands are taken from the standard input.

       ccoolloorr==_n_a_m_e
	      Starting color desired for graphics.
	      Options: red,  orange,  yellow,  green,  blue,  indigo,  violet,
	      magenta, brown, gray, white, and black.
	      Default: _w_h_i_t_e



       The  coordinate system used is 0-100 in x and 0-100 in y, regardless of
       the graphics monitor display frame size and aspect.  The (0,0) location
       is  the lower left corner of the active graphics monitor display frame.
       All values may be floating point.


       The graphics language is simple, and uses the following commands:

       ## _c_o_m_m_e_n_t
	      A line of comment which is ignored in the processing.

       mmoovvee _x_p_o_s ypos
	      The current location is updated to _x_p_o_s _y_p_o_s.  Values are stated
	      as a percent of the active display frame's horizontal (_x_p_o_s) and
	      vertical (_y_p_o_s) size, and may be floating point  values.	Values
	      are between 0-100.  NNoottee.. A space must separate _x_p_o_s and _y_p_o_s.

       ddrraaww _x_p_o_s ypos
	      A  line  is drawn in the current color from the current location
	      to the new location _x_p_o_s ypos, which then  becomes  the  current
	      location.   Values are stated as a percent of the active display
	      frame's horizontal (_x_p_o_s) and vertical (_y_p_o_s) size, and  may  be
	      floating	point values. Values are between 0-100.  NNoottee.. A space
	      must separate _x_p_o_s and _y_p_o_s.

       ccoolloorr _c_o_l_o_r
	      Sets the current color to that stated; subsequent graphics  will
	      be  drawn in the stated color, until the current color is set to
	      a different color.  Options  are	_r_e_d,  _o_r_a_n_g_e,  _y_e_l_l_o_w,	_g_r_e_e_n,
	      _b_l_u_e, _i_n_d_i_g_o, _v_i_o_l_e_t, _b_r_o_w_n, _m_a_g_e_n_t_a, _g_r_a_y, _w_h_i_t_e, and _b_l_a_c_k.

       ssiizzee _x_p_e_r yper
	      Subsequent text will be drawn such that the text is _x_p_e_r percent
	      of the graphics monitor display frame wide and _y_p_e_r  percent  of
	      the frame high. By default, the text size is set to 1 percent of
	      the active frame's width and 1 percent of the frame's height  if
	      unspecified by the user (this may be too small to be seen by the
	      user).
	      NNoottee.. A space must separate _x_p_e_r and _y_p_e_r.

       tteexxtt _l_i_n_e_-_o_f_-_t_e_x_t
	      The stated text is drawn at the current location using the  cur-
	      rent  color,  and the new current location is then positioned at
	      the end of the text string.

       iiccoonn _t_y_p_e _s_i_z_e _x _y
	      Draws an icon of types _o, _x, or _+ with specified _s_i_z_e  at  loca-
	      tion _x_,_y.  Note: type _o designates a square.

       ppoollyyggoonn

		_x_p_o_s _y_p_o_s

		_x_p_o_s _y_p_o_s

	      The coordinates appearing beneath the word _p_o_l_y_g_o_n, one pair per
	      line, circumscribe a polygon that is to be filled with the  cur-
	      rent color.


EEXXAAMMPPLLEE
       For  an	example use of _d_._g_r_a_p_h, examine the contents of the macro com-
       mand _$_G_I_S_B_A_S_E_/_b_i_n_/_g_r_a_s_s_._l_o_g_o_._s_h located in the GRASS command bin (which
       draws  a  GRASS	logo  by  inputting _d_._g_r_a_p_h graphics commands that are
       stored  in  a  shell  file).   Note  that  the	coordinates   in   the
       _g_r_a_s_s_._l_o_g_o_._s_h  macro  were taken directly off an image drawn by hand on
       graph paper.

NNOOTTEESS
       _d_._g_r_a_p_h remembers the last screen location (xpos  ypos)	to  which  the
       user  moved, even after the user erases the display frame.  If the user
       runs _d_._g_r_a_p_h repeatedly, and wishes to  start  anew  with  the  default
       (xpos  ypos)  screen  location, the user should _c_l_e_a_r the display frame
       between runs of _d_._g_r_a_p_h.

LLIIMMIITTAATTIIOONNSS
       There are no automated ways of generating graphic images. It is antici-
       pated  that GRASS user sites will write programs to convert output from
       a resident graphics editor into GRASS _d_._g_r_a_p_h format.

SSEEEE AALLSSOO
       _d_._f_o_n_t

       _d_._m_a_p_g_r_a_p_h

       _d_._t_e_x_t

       _g_r_a_s_s_._l_o_g_o_._s_h

       _p_a_r_s_e_r

AAUUTTHHOORR
       James Westervelt, U.S. Army Construction Engineering  Research  Labora-
       tory

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_1_/_2_5 _0_5_:_4_5_:_3_2 _$



GRASS 5.0							    d.graph(1)
