home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / e / estat21.zip / EASIDOC.ZIP / ESCHAP12.DOC < prev    next >
Text File  |  1992-06-30  |  11KB  |  331 lines

  1.  
  2.  
  3.      Chapter 12: FORMAT OF GRAPH FILES
  4.  
  5.      If you are using EASIGRAF with EASISTAT then you may not
  6.      need to know much about the format of the graph files, in
  7.      fact you never look at the files themselves at all but
  8.      just have them passed straight to EASIGRAF. However for
  9.      those who are interested, particularly those who wish to
  10.      use EASIGRAF to display graphs from other sources, the
  11.      format of the files is described below. If you are
  12.      interested in producing graph files yourself then you
  13.      should also take a look at the example graph files
  14.      provided and the files produced by EASISTAT to help you
  15.      understand how they work.
  16.  
  17.      EASIGRAF graph files are simple ASCII files containing
  18.      information describing the data to be displayed. This
  19.      consists of title lines, the data values and information
  20.      concerning the organisation and scaling of the data and
  21.      other aspects of how the graph should be displayed. The
  22.      only things that it is essential appear in a graph file
  23.      are a number of lines beginning TITLEG: and a table of
  24.      data values. There must be one more TITLEG: than there
  25.      are columns of data. The data values consist either of
  26.      numbers or of simple or complicated arithmetic
  27.      expressions, all separated by commas. Here is very simple
  28.      graph file:
  29.  
  30.      TITLEG:
  31.      TITLEG:
  32.      TITLEG:
  33.      1,2
  34.      2,4
  35.      3,6
  36.  
  37.  
  38.      12:1. Full specification of
  39.      graph file
  40.  
  41.      Below is listed is the full specification for the
  42.      information which may appear in a graph file.
  43.  
  44.      Optional:
  45.  
  46.      One line beginning PARMS: followed by L, V or S for line,
  47.      vertical bar or scatter chart.
  48.  
  49.      Optional:
  50.  
  51.      One or two lines beginning TITLE: followed by the main
  52.      title for the graph.
  53.  
  54.      Optional:
  55.  
  56.      One line beginning TITLEV: followed by a title for the
  57.      vertical axis of the graph (in certain data groupings).
  58.  
  59.      Optional:
  60.  
  61.      One line beginning TITLEC: followed by an overall title
  62.      for the row variables of the data.
  63.  
  64.  
  65.      
  66.        105 
  67.         Format of graph files  
  68.      
  69.      Obligatory:
  70.  
  71.      Lines beginning TITLEG:. There must be one more such line
  72.      than there are columns of data. The first TITLEG: may
  73.      optionally be followed by an overall title for the column
  74.      variables. The second TITLEG: may optionally be followed
  75.      by a title for the first column of data, the third
  76.      TITLEG: can have a title for the second column, etc.
  77.  
  78.      Optional:
  79.  
  80.      A line beginning PARSE. If this line appears then
  81.      complicated arithmetic expressions may be entered as data
  82.      values (see below), but the input of the data will be
  83.      slower. If it is desired only to use simple expressions
  84.      then this line should be omitted. This line is not
  85.      compatible with PCG2.
  86.  
  87.      All the above lines must appear before any lines
  88.      containing data values.
  89.  
  90.      Obligatory:
  91.  
  92.      Lines containing data values. These are numbers or
  93.      arithmetic expressions separated by commas. There must be
  94.      no comma after the last number. Values can be missing and
  95.      will then be recognised as such. Optionally after the
  96.      last number a colon may appear, followed by a title for
  97.      the variable that that row represents.
  98.  
  99.      A data value may either be a number, such as -4.5, or a
  100.      simple or complicated arithmetic expression. A simple
  101.      expression consists of two numbers with separated by a +,
  102.      -, * or /, for example 3.2-4.1 or 4.7/6.222. A
  103.      complicated expression would be as described in the
  104.      EASISTAT documentation, for example
  105.      sin(4.3/6)*pn(2pow1.4). Complicated expressions can only
  106.      be used if a line beginning with the keyword PARSE has
  107.      previously appeared.
  108.  
  109.      Instead of a data value the keyword OMIT can be entered.
  110.      In most circumstances this is just treated as if the
  111.      value were missing. However if a line graph is being
  112.      drawn then OMIT means that a break occurs in the line
  113.      instead of it being drawn continuously between the points
  114.      on either side of the missing value as would be the case
  115.      if the data value were simply absent.
  116.  
  117.      Optional:
  118.  
  119.      A line beginning DATATYPE: followed immediately by either
  120.      GRC or GCR or GR or GC or XY, meaning group by rows and
  121.      columns, or by columns and rows, or by rows, or by
  122.      columns, or plot pairs of columns against each other.
  123.      Tbis line is used to choose between the graphing options
  124.      which are described in the section above about the "Data"
  125.      menu. When the XY option is used then the XY must be
  126.      followed by two or three numbers separated by commas
  127.      which specify the columns of data to use for the X, Y and
  128.      optionally Z variables. As described above, if the third
  129.      number is negative then the absolute value of this number
  130.      will be used as a constant for the Z value. Only one
  131.      
  132.        106 
  133.         Format of graph files  
  134.      
  135.      DATATYPE line should be present, unless the XY option is
  136.      selected in which case a number of different lines can
  137.      appear which can each specify different groups of columns
  138.      to be plotted against each other, thus producing a
  139.      multiple X-Y plot.
  140.  
  141.      Optional:
  142.  
  143.      Lines each beginning MINX: or MAXX: or XINC: or MINY: or
  144.      MAXY: or YINC: specifying the minimum or maximum values
  145.      for the X or Y axis, or the value of the increment
  146.      between ticks on the axis and numbered points on the
  147.      scale. These lines have the same effect as the values
  148.      which are input from the "Axes" menu.
  149.  
  150.      Optional:
  151.  
  152.      Lines beginning TITLEF: followed by three numbers
  153.      separated by commas specifying the X and Y coordinates
  154.      and rotation of a floating title, followed by a comma and
  155.      the title itself.
  156.  
  157.      Optional:
  158.  
  159.      A line beginning KEYPOS: followed by a number from 1 to 5
  160.      specifying the position of the key.
  161.  
  162.      Optional:
  163.  
  164.      A line beginning SHADE: followed by a number from 0 to 10
  165.      specifying the shading value to use.
  166.  
  167.      Optional:
  168.  
  169.      A line beginning with any of the subsequent keywords
  170.      followed by either ON or OFF to indicate whether the item
  171.      referred to should be displayed or not: MAINTITLE:,
  172.      MAINXTITLE:, XTITLES:, YTITLE:, FLOATTITLES:, XAXIS:,
  173.      YAXIS:, XTICKS:, YTICKS:, XSCALE:, YSCALE:, MEAN:, XONY:,
  174.      YONX:, KEY:, or THREED:. The default values for these
  175.      parameters depend on the type of data grouping used.
  176.      MEAN:, XONY: and YONX: refer to the mean and regression
  177.      lines. THREED: refers to whether the "three-dimensional"
  178.      display is used.
  179.  
  180.      When a graph file is saved from EASIGRAF then all these
  181.      lines will be written, so it is possible to check the
  182.      format by reference to such a file. The example files
  183.      supplied for use by the GRAFDEMO demonstration can also
  184.      be referred to.
  185.  
  186.  
  187.      12:2. Example graph file
  188.  
  189.      Here is an example of the a valid graph file which
  190.      illustrates some of the features specified above:
  191.  
  192.      PARMS:V
  193.      TITLE:First title line
  194.      TITLE:Second title line
  195.      TITLEV:Vertical title up Y axis
  196.      TITLEG:Title for column variables
  197.      
  198.        107 
  199.         Format of graph files  
  200.      
  201.      TITLEG:First column title
  202.      TITLEG:Second column title
  203.      TITLEG:Third column title
  204.      2,1+2,3:First row title
  205.      4,8,4:Second row title
  206.      27,OMIT,6:Third row title
  207.      7,14.7,7:Fourth row title
  208.      4,,9:Fifth row title
  209.      MINX:0
  210.      MAXX:18.5
  211.      XINC:1
  212.      MINY:0
  213.      MAXY:27
  214.      YINC:2
  215.      DATATYPE:XY2,1
  216.      DATATYPE:XY3,1,-0.5
  217.      TITLEF:0.1,0.1,0,Here is a floating title
  218.      TITLEF:0.2,0.2,90,Here is another
  219.      KEY:ON
  220.      THREED:ON
  221.  
  222.      The first line specifies that the graph will be drawn as
  223.      a vertical bar chart. The graph title lines and column
  224.      titles follow. Since there are four TITLEG: lines then
  225.      three columns of data will be expected. Five rows of data
  226.      follow, each followed by its own title. It can be seen
  227.      that the first row contains a simple arithmetic
  228.      expression, 1+2, and the third row contains the OMIT
  229.      keyword which would produce a break in the line if a line
  230.      graph were drawn instead of a bar chart. In the fifth row
  231.      the second value is missing. Minimum and maximum values
  232.      for the axes are specified next, with a distance of 1
  233.      between ticks on the X axis and a distance of 2 between
  234.      ticks on the Y axis. The first DATATYPE line means that
  235.      values from the first column are to be plotted against
  236.      values in the second column. No column is specified to
  237.      provide Z values so the default of a constant value of 1
  238.      will be used for all Z values. The second DATATYPE line
  239.      means that values from the first column are to be plotted
  240.      against values in the third column. The value of -0.5
  241.      means that a constant of 0.5 will be used for all Z
  242.      values. Since a vertical bar chart is being drawn, this
  243.      means that the width of these bars will be 0.5. Two
  244.      floating titles are specified, with origins at 0.1,0.1
  245.      and 0.2,0.2 using the screen coordinate system (i.e.
  246.      ignoring the scale of the X and Y axes). The first has a
  247.      rotation of 0 and so is written horizontally, but the
  248.      second has a rotation of 90 degrees and will be written
  249.      vertically. The last two lines specify that the key
  250.      should be displayed and that the three-dimensional option
  251.      should be used, which for a vertical bar chart means that
  252.      the bars are displayed as solid blocks.
  253.  
  254.  
  255.      12:3. Compatibility with
  256.      PCG2
  257.  
  258.      PCG2 is a graphing program supplied with the Shareware
  259.      database PC-File. You may wish to use this program
  260.      instead of EASIGRAF to display some of your graphs
  261.      because it can produce pie charts and better looking
  262.      titles, and can output PostScript. All the lines above
  263.      
  264.        108 
  265.         Format of graph files  
  266.      
  267.      which appear before the table of data values are
  268.      compatible with PCG2 except for the PARSE line. The data
  269.      values themselves are also compatible provided that
  270.      numbers are entered rather than arithmetic expressions
  271.      and that there are no missing values, and provided the
  272.      OMIT keyword is not used. All lines specified after the
  273.      data value table are not compatible with PCG2 and would
  274.      need to be deleted before the file could be displayed
  275.      using PCG2. Note that to use PCG2 the file must actually
  276.      have the name GRAPH.ME.
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.      
  330.        109 
  331.