Drawing a graph

                       +--------------------------+
                       |CALL  IGRAPH (N,X,Y,CHOPT) |
                       +--------------------------+
                                  
Action: This routine draws (in the current normalization transformation) a graph with several possible presentations. Parameter Description:
N
Number of components in the arrays X and Y.
X
Array of dimension N containing the x coordinates in world coordinates space of the graph to be drawn.
Y
Array of dimension N containing the y coordinates in world coordinates space of the graph to be drawn.
CHOPT
CHARACTER variable specifying the options chosen (multiple simultaneous options are possible).
'R'
The graph is Rotated, i.e. the values in X are used for the ordinate and the values in Y for the abscissa (default is the contrary).
'L'
All points are connected with a straight line. (default)
'F'
A Fill area is drawn through the points with the current fill area attributes. The border is never drawn unless the fill area interior style is hollow or the routine IGSET has been called with 'BORD' and VAL = 1..
'C'
The values in Y are plotted in the form of a smooth curve. Spline approximation algorithms are used. This option can be used with option F in order to draw a smooth fill area.
'*'
A star is plotted at every point.
'P'
A marker is plotted at every point, according to the current polymarker attributes.
'B'
The values in Y are plotted in the form of bars. The width of the bar is by default 50% of the interval X(I)-X(I-1). This percentage can be changed by calling IGSET with option BARW.
'A'
X and Y axes are drawn on the border of the current normalization transformation.
'GX'
Logarithmic scale on the X axis.
'GY'
Logarithmic scale on the Y axis.
        Example of GRAPH drawing (see result on figure
                          [more info])
                                  
      program  graph
      character*4 chopt(4)
      dimension x(9),y(9)
      parameter (xsize=16.,ysize=20.)
      data x/0.,.6,.3,.2,-.3,.3,-.2,-.3,-.6/
      data y/0.,-.2,-.7,-.9,-.2,.2,.9,.7,.2/
      data chopt/'AL*','AC*','AF*','ACF*'/
*
      call start('graph',xsize,ysize)
*
*              Viewports definition
*
      xnorm  = min(1.,xsize/ysize)
      xnorm2 = xnorm/2.
      ynorm  = min(1.,ysize/xsize)
      ynorm2 = ynorm/2.
      rmarg  = 0.05
      rmarg2 = rmarg/2.
      call isvp(10,rmarg,xnorm2-rmarg2,ynorm2+rmarg2,ynorm-rmarg)
      call isvp(20,xnorm2+rmarg2,xnorm-rmarg,ynorm2+rmarg2,ynorm-rmarg)
      call isvp(30,rmarg,xnorm2-rmarg2,rmarg,ynorm2-rmarg2)
      call isvp(40,xnorm2+rmarg2,xnorm-rmarg,rmarg,ynorm2-rmarg2)
*
*              Some attributes setting
*
      call isclip(0)
      call igset('FASI',244.)
      call igset('BORD',1.)
      call igset('CHHE',.05)
*
*              GRAPH drawing
*
      do i=1,4
         call iswn(10*i,-1.,1.,-1.,1.)
         call iselnt(10*i)
         call igset('FAIS',0.)
         call igbox(-1.,1.,-1.,1.)
         call itx(.3,.9,'CHOPT = '''//CHOPT(I)//'''')
         call igset('FAIS',3.)
         call igraph(9,x,y,chopt(i))
      enddo
      call finish
*

      end


                                                                                       

Figure: Example of IGRAPH using L,C,F and * options.

[GRAPH]