Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Library for Clipper - <b>l_xygraph()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                            L_XYGRAPH()


Syntax:       L_XYGRAPH(<expN1>,<expN2>,<expN3>,<expN4>,
              <expN5>,<expN6>,<expN7>,<array1>,<array2>,
              <expN8>,<expN9>...[<array_n>,<array_n+1>,
              <expN8+n>,<expN9+n>])

Purpose:      To draw an xy graph on the screen using the
              specified data.

Arguments:    <expN1> is the x coordinate of the upper
              left corner of the graph.

              <expN2> is the y coordinate of the upper
              left corner of the graph.

              <expN3> is the x coordinate of the lower
              right corner of the graph.

              <expN4> is the y coordinate of the lower
              right corner of the graph.

              <expN5> is the color code for the color of
              the axes.

              <expN6> is the maximum value represented by
              the horizontal axis.

              <expN7> is the maximum value represented by
              the vertical axis.

              <array1> is the data to be plotted as the
              horizontal coordinates of the first set of
              points

              <array2> is the data to be plotted as the
              vertical coordinates of the first set of
              points

              <expN8> is the color code for the first set
              of points and the line joining them.

              <expN9> is the style in which the first set
              of points are to be plotted.

              <array_n> is the data to be plotted as the
              horizontal coordinates of the final set of
              points.

              <array_n+1> is the data to be plotted as the
              vertical coordinates of the final set of
              points.

              <expN8+n> is the color code for the final
              set of points.

              <expN9+n> is the style in which the final
              set of points are to be plotted.


Returns:      Nothing.


Usage:        They styles available for plotting points
              are as follows:

              Style 1 : A simple point.
              Style 2 : '+'.
              Style 3 : 'x'.
              Style 4 : A point in a box.
              Style 5 ; '*'.

Examples:     DECLARE arr_h1[12]
              DECLARE arr_v1[12]
              DECLARE arr_v2[12]
              DECLARE labs_v[4]
              DECLARE labs_h[12]

              startx=50
              starty=50
              endx=400
              endy=600
              months='JanFebMarAprMayJunJulAugSepOctNovDec'

              FOR i = 1 TO 12
                 arr_h1[i] = i-1
              NEXT

              arr_v1[1]=7
              arr_v1[2]=8
              arr_v1[3]=7
              arr_v1[4]=6.5
              arr_v1[5]=6
              arr_v1[6]=7
              arr_v1[7]=4.5
              arr_v1[8]=6
              arr_v1[9]=6.5
              arr_v1[10]=10
              arr_v1[11]=9
              arr_v1[12]=10

              arr_v2[1]=2
              arr_v2[2]=4
              arr_v2[3]=6
              arr_v2[4]=6
              arr_v2[5]=10
              arr_v2[6]=8
              arr_v2[7]=6
              arr_v2[8]=4
              arr_v2[9]=2
              arr_v2[10]=4
              arr_v2[11]=6
              arr_v2[12]=8

              labs_v[1]='0'
              labs_v[2]='5'
              labs_v[3]='10'
              labs_v[4]='15'

              FOR i = 1 TO 12
                 labs_h[i]=SUBSTR(months,((i-1)*3)+1,3)
              NEXT

              L_GMODE(18)
              L_TSIZE(2)
              L_TEXT('Planet Software - XYgraph',1,30,120,8,2)
              L_XYGRAPH(startx,starty,endx,endy,1,11,15,;
                        arr_h1,arr_v1,14,5,arr_h1,arr_v2,4,3)
              L_AXES(startx,starty,endx,endy,labs_v,labs_h,3,14)
              INKEY(0)
              L_GMODE(3)


Note:      'The Library' graph functions should not be compiled using the
           /Oalt option of the Microsoft C Compiler.


Language:     C

See Also: L_AXES() L_HBAR() L_HSBAR() L_PIE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson