gradu(1)                                                 gradu(1)



NNAAMMEE
       gradu - graphics dump



SSYYNNOOPPSSIISS
       ggrraadduu [[--ddhhvv]] [[--aa _t_i_m_e]] [[--bb _c_o_l_o_r]] [[--cc _c_o_l_o_r]] [[--ss _s_i_z_e]] [[--tt
       _t_y_p_e]] [[--xx _l_i_m_i_t]] [[--yy _l_i_m_i_t]]  [[--XX  _l_i_m_i_t]]  [[--YY  _l_i_m_i_t]]  [[--]]
       [[_f_i_l_e_s_._._.]]



DDEESSCCRRIIPPTTIIOONN
       ggrraadduu inputs a data stream of formatted text and renders a
       graphical  manifestation.  Various  command  line  options
       establish  initial  formatting  parameters.  The formatted
       text stream generally specifies  the  graphical  elements,
       but can also configure some formatting parameters.


OOPPTTIIOONNSS
       --aa _t_i_m_e
              Animation  frame interval for GIF mode in millisec-
              onds.


       --bb _c_o_l_o_r
              Background color. The default is black.  _c_o_l_o_r  can
              be  expressed  as a human-readable color word known
              to the system (magenta) or by a normal hex encoding
              ("#ff00ff").  When  specifying colors in hex format
              as an argument to  a  command  line  option,  quote
              marks are recommended to avoid conflicts with shell
              syntax. See _._._._/_p_l_o_t_u_t_i_l_s_/_d_o_c_/_c_o_l_o_r_s_._t_x_t  for  more
              information about color specification.


       --cc _c_o_l_o_r
              Color  for  plotted  graphical elements. This over-
              rides the default which is white ("#ffffff").


       --dd     Double buffering for animated X window output. This
              option  causes  output  to be suppressed until each
              frame is complete (signaled with a reset  command).
              The result is typically a smoother animation.


       --hh     Help and usage message.


       --ss _s_i_z_e
              Size  of  bitmap.  The format for this is COLxROWS.
              The default is 570x570.  Additionally,  X  geometry
              specifications (WIDTHxHEIGHT+XOFF+YOFF) can be used
              in X mode to position the output.   This  parameter
              has  no  effect on vector output formats (PS, HPGL,
              etc).


       --tt _t_y_p_e
              Type of output. The libplot  library  supports  the
              following  output  format  types: X, png, pnm, gif,
              ps, hpgl, Xdrawable, svg, ai, fig, pcl, regis, tek,
              meta.  Only  the  first  five have been tested with
              ggrraadduu.


       --vv     Verbose mode. Typically, the program generates  the
              desired  graphic  format on the standard output and
              the standard error stream is quiet unless there  is
              an  actual  error  (uh, one that has been accounted
              for!). With the verbose mode,  the  standard  error
              stream  receives  a  formatted  reiteration of each
              directive received from standard input.   This,  in
              effect, allows the user to "record" plot operations
              with ggrraadduu.  This is particularly useful as  a  way
              to  save  data  generated  by direct input with the
              console as in this example:
              $ ggrraadduu --vv -- 22>> oonntthheeffllyy..ggrrdduu
              Another useful application of this  is  to  capture
              output  generated  arbitrarily for preservation and
              later analysis as in:
              $ ffoooommoonn || ggrraadduu --vv -- 22>> ``ddaattee ++%%yy..%%mm..lloogg``
              The effect can be very much like using the Unix tteeee
              command  except that the actual data is reformatted
              into a form that ggrraadduu likes to see.  Also,  unlike
              the tteeee command, you can pipe the standard error to
              other programs  for  follow  up  parsing.  However,
              don't  send  that  back  to ggrraadduu since that causes
              ugly problems!


       --xx _l_i_m_i_t
              Sets the minimum plottable horizontal user  coordi-
              nate.  Be careful to use quoting when setting nega-
              tive values which  could  be  confused  with  other
              options. (-x "-3.4")

       --yy _l_i_m_i_t
              Sets  the  minimum  plottable vertical user coordi-
              nate. Be careful to use quoting when setting  nega-
              tive  values  which  could  be  confused with other
              options. (-y "-3.4")

       --XX _l_i_m_i_t
              Sets the maximum plottable horizontal user  coordi-
              nate.

       --YY _l_i_m_i_t
              Sets  the  maximum  plottable vertical user coordi-
              nate.



IINNPPUUTT SSYYNNTTAAXX
       ggrraadduu is designed to accomodate a wide variety of sensible
       input  styles  constrained  by  some  simple  rules. Input
       streams are parsed line by line. Each line typically  con-
       tains  a  command  specifier  and  arguments.  The command
       specifier is a single case-insensitive character. It  does
       not  matter where in the line the command is as long as it
       is the first plausible command found in a  left  to  right
       search  of  the  string. This implies that the command can
       come after some or all of the arguments  (which  must,  of
       course, be in the correct order). It also implies that the
       command and arguments can be delimited by  any  characters
       that won't cause confusion. See examples.


       <<bbllaannkk>>
              A  blank input line causes the drawing buffer to be
              flushed. Sometimes  the  plotting  process  doesn't
              immediately  show  the  results  while in progress.
              Issuing a blank  line  insures  that  all  elements
              ordered  up until that point are delivered. This is
              quite useful  while  manually  entering  redirected
              data from the console.


       ##||!! _c_o_m_m_e_n_t
              Any  line  containing  a  #  or ! anywhere are com-
              pletely ignored. This has precedence  over  a  line
              containing a plausible command. See examples.


       @@||++++ _[_c_o_m_m_a_n_d_] _[_r_e_l_a_t_i_v_e _a_r_g_s_._._._]
              Any line containing a ++ or @ character anywhere in
              the line activates the relative coordinate  adress-
              ing  flag. Any command that supports relative coor-
              dinate addressing will then interpret arguments  as
              vectors  from  the  last  point and not the origin.
              This directive is used in  conjunction  with  other
              commands on a single line and has no effect on sub-
              sequent lines without the relative  modifier.  Note
              that  a  single  +  symbol  is considered part of a
              numerical input and simply translated to 0.


       aa[[rrcc]] _x_c _y_c _x_0 _y_0 _x_1 _y_1
              Arc from point (x0,y0) to (x1,y1) with a center  of
              (xc,yc). Rotation sense is counter-clockwise.


       bb[[ooxx]] _x_1 _y_1 _x_2 _y_2
              Box  (rectangular)  shape  with corners at (x1,y1),
              (x1,y2), (x2,y2), and (x2,y1).


       cc[[iirrccllee]] _x_c _y_c _r
              Circle with a center at (xc,yc) and a radius r.


       dd[[oott]] _x _y
              Dot or single  pixel  (or  tiny  vector)  at  point
              (x,y).


       jj[[uummpp]] _x _y
              Jump  to  point  (x,y)  without drawing anything in
              preparation  for  a  subsequent   command   (mainly
              "next").


       [[lliinnee]] _x_1 _y_1 _x_2 _y_2
              Line  from  (x1,y1)  to  (x2,y2). If there are four
              plausible numerical arguments and no possible  com-
              mand  is  specified,  then  the  'line'  command is
              implied.


       mm[[aarrkkeerr]] _x _y _[_s_t_y_l_e _[_s_i_z_e_]_]
              Marker point at (x,y). The  style  argument  is  an
              integer  specifying  what  kind  of mark to produce
              while size is how big to make it. If  style  and/or
              size  are omitted, the last known value is used for
              the  missing  argument.  Common  style  codes  are:
              1=dot,  2=plus,  3=asterisk,  4=circle,  5=X-cross,
              6=square, 7=tri up, 8=diamond, 9=star, 10=tri down,
              11=starburst,  12=crosshair,  13=fancy  X, 14=fancy
              square,  15=fancy  diamond,  30=octagon,  31=filled
              octagon.  There  are  some other symbols between 15
              and 30 - YMMV. Style codes above 31 are interpreted
              as ASCII characters.


       [[nneexxtt]] _x _y
              Next point in a line sequence from current position
              to (x,y). This can be used with 'jump'  to  produce
              intermittent  line segments. If less than 4 plausi-
              ble numeric arguments and no  possible  command  is
              specified, then the 'next' command is implied.


       oo[[vvaall]] _x_c _y_c _r_x _r_y _a_n_g
              Oval  or  ellipse with a center at (xc,yc), a width
              of rx, a height of ry, and a rotation of angle ang.


       rr[[eesseett]]
              Reset clears the graphics display. For X window and
              GIF output, this allows  for  animation  possibili-
              ties. See options -a and -d.


       tt[[eexxtt]] _x _y  _<_n_e_w_l_i_n_e_>_t_e_x_t
              Text  beginning at point (x,y). This command has an
              unusual format because it really prepares  for  the
              special  interpretation  of  the  next  line of the
              input stream. Therefore text  output  requires  two
              lines  from  the  input file. The first line issues
              the text command and positions the text.  The  line
              immediately  following  is  not  parsed  and inter-
              preted, but rather it is received as the string  to
              be plotted.


       pp[[rroopp]] <<ssuubbccoommmmaanndd>> _<_a_r_g_>
              The  "property"  command  enters  a  submode  which
              allows the datastream to control various aspects of
              the  plotted  graphics beyond the geometry.  If "p"
              is scanned as the first viable command option, then
              the  line is rescanned looking for the first viable
              suboption. If a valid suboption is found, then  the
              line is scanned again for the correct argument (see
              Property Examples).

              [[aa]]nnggllee _t_e_x_t_a_n_g_l_e
                An angle measured  in  counter-clockwise  degrees
              from the positive x axis.

              [[cc]]oolloorr _c_o_l_o_r
                A name from rgb.txt or 48-bit hex style.

              [[ee]]nnddccaapp _m_o_d_e
                (projecting  | round | butt) How the ends of wide
              lines will look.

              [[ff]]oonnttssiizzee _v_a_l_u_e
                How high the font should be in user  coordinates.

              [[jj]]ooiinn _m_o_d_e
                (miter | round | bevel | triangular) How the end-
              point intersections of sequential  wide  line  seg-
              ments will look.

              [[ll]]iinnee _m_o_d_e
                (solid | dotted | dotdashed | shortdashed | long-
              dashed | dotdotdashed | dotdotdotdashed  |  discon-
              nected)  Sets  linestyle  in  a  relatively easy to
              specify way.

              [[ww]]iiddtthh _v_a_l_u_e
                How wide subsequent graphical  elements  will  be
              plotted.


EEXXAAMMPPLLEESS
       General Format Examples-

       The following commands should all be legal:



              ##Example commands


              mmarker at=( _2_0_0_,_1_5_0 ) type=_3 size=_5_0


              lline ( _1_0_0_,_1_0_0) to (_1_5_0_,_1_5_0)


              @@_-_5_0_,_5_0


              @@nnext to ( _0_,_-_1_0_0)


              jjump to=( _1_0_0_,_1_5_0)


              pp ww _1_5


              nnext to ( _0_,_1_5_0)


              pp cc _p_i_n_k


              ccircle cen=( _2_0_0_,_1_5_0) rad=_4_0



       Property Examples-

       These commands are equivalent:

              pp ww _0_._0_5

              PPWW_0_._0_5

              ppropwwidth _0_._0_5

              _0_._0_5 ww pp

       Note, however, that

              ppropeerty width _0_._0_5

       is problematic because the main command is parsed as a "p"
       correctly, but the subcommand is parsed as an "e"  (endcap
       mode).  The more extraneous letters in the input, the bet-
       ter chance for a conflict if features are added later.


       Delimiter Examples-

       This draws a circle:

              c$5,5$1$

       But this does nothing:

              c!5,5!1!

       Does NOT work because ! is a comment specifier  which  has
       precedence.


       Command Line Example-

              $ ggrraadduu --ss 664400xx448800++5500++5500 --tt XX ddaattaa** --

       Creates an X window of the specified geometry plotted with
       files starting with "data" and then waits  for  additional
       user input via the stdin (perhaps the console).


BBUUGGSS
       Documentation  with  the  phrase  "...projecting | round |
       butt..." sounds like a joke, but it's not!

       Error checking/handling is VERY weak!!!

       Ouch! Don't pipe the stderr  to  the  program  again  even
       though this seems vaugely plausible (like the plot of most
       time travel stories).

       Hmmm. Line mode property doesn't seem to work at all....

       Hmmm. Marker styles seem to not be  completely  unique  as
       implied by libplot documentation....

       Hmmm.  The  libplot "line" command doesn't seem to work at
       all. I had to cheat and use basically a "jump" and then  a
       "next" to acheive the same effect....


AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS
       This  entire  program is nothing but a way for a Unix user
       to lazily access the libplot programming  library  written
       by  RRoobbeerrtt SS.. MMaaiieerr, maintainer of the GNU plotting utili-
       ties package. I specifically used plotutils-2.4.1  and  if
       you want to have this program work, you should too.

       For  more  information  about  this goodly work check out:
       _h_t_t_p_:_/_/_w_w_w_._g_n_u_._o_r_g_/_s_o_f_t_w_a_r_e_/_p_l_o_t_u_t_i_l_s_/_p_l_o_t_u_t_i_l_s_._h_t_m_l
       _h_t_t_p_:_/_/_w_w_w_._m_a_t_h_._a_r_i_z_o_n_a_._e_d_u_/_~_r_s_m


AAUUTTHHOORR
       This marginally useful program was written by:
              Chris XX Edwards
              _<_c_h_r_i_s_@_x_e_d_._c_h_>



LWM                         2001.12.08                   gradu(1)
