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 >
Wrap
Text File
|
1992-06-30
|
11KB
|
331 lines
Chapter 12: FORMAT OF GRAPH FILES
If you are using EASIGRAF with EASISTAT then you may not
need to know much about the format of the graph files, in
fact you never look at the files themselves at all but
just have them passed straight to EASIGRAF. However for
those who are interested, particularly those who wish to
use EASIGRAF to display graphs from other sources, the
format of the files is described below. If you are
interested in producing graph files yourself then you
should also take a look at the example graph files
provided and the files produced by EASISTAT to help you
understand how they work.
EASIGRAF graph files are simple ASCII files containing
information describing the data to be displayed. This
consists of title lines, the data values and information
concerning the organisation and scaling of the data and
other aspects of how the graph should be displayed. The
only things that it is essential appear in a graph file
are a number of lines beginning TITLEG: and a table of
data values. There must be one more TITLEG: than there
are columns of data. The data values consist either of
numbers or of simple or complicated arithmetic
expressions, all separated by commas. Here is very simple
graph file:
TITLEG:
TITLEG:
TITLEG:
1,2
2,4
3,6
12:1. Full specification of
graph file
Below is listed is the full specification for the
information which may appear in a graph file.
Optional:
One line beginning PARMS: followed by L, V or S for line,
vertical bar or scatter chart.
Optional:
One or two lines beginning TITLE: followed by the main
title for the graph.
Optional:
One line beginning TITLEV: followed by a title for the
vertical axis of the graph (in certain data groupings).
Optional:
One line beginning TITLEC: followed by an overall title
for the row variables of the data.
105
Format of graph files
Obligatory:
Lines beginning TITLEG:. There must be one more such line
than there are columns of data. The first TITLEG: may
optionally be followed by an overall title for the column
variables. The second TITLEG: may optionally be followed
by a title for the first column of data, the third
TITLEG: can have a title for the second column, etc.
Optional:
A line beginning PARSE. If this line appears then
complicated arithmetic expressions may be entered as data
values (see below), but the input of the data will be
slower. If it is desired only to use simple expressions
then this line should be omitted. This line is not
compatible with PCG2.
All the above lines must appear before any lines
containing data values.
Obligatory:
Lines containing data values. These are numbers or
arithmetic expressions separated by commas. There must be
no comma after the last number. Values can be missing and
will then be recognised as such. Optionally after the
last number a colon may appear, followed by a title for
the variable that that row represents.
A data value may either be a number, such as -4.5, or a
simple or complicated arithmetic expression. A simple
expression consists of two numbers with separated by a +,
-, * or /, for example 3.2-4.1 or 4.7/6.222. A
complicated expression would be as described in the
EASISTAT documentation, for example
sin(4.3/6)*pn(2pow1.4). Complicated expressions can only
be used if a line beginning with the keyword PARSE has
previously appeared.
Instead of a data value the keyword OMIT can be entered.
In most circumstances this is just treated as if the
value were missing. However if a line graph is being
drawn then OMIT means that a break occurs in the line
instead of it being drawn continuously between the points
on either side of the missing value as would be the case
if the data value were simply absent.
Optional:
A line beginning DATATYPE: followed immediately by either
GRC or GCR or GR or GC or XY, meaning group by rows and
columns, or by columns and rows, or by rows, or by
columns, or plot pairs of columns against each other.
Tbis line is used to choose between the graphing options
which are described in the section above about the "Data"
menu. When the XY option is used then the XY must be
followed by two or three numbers separated by commas
which specify the columns of data to use for the X, Y and
optionally Z variables. As described above, if the third
number is negative then the absolute value of this number
will be used as a constant for the Z value. Only one
106
Format of graph files
DATATYPE line should be present, unless the XY option is
selected in which case a number of different lines can
appear which can each specify different groups of columns
to be plotted against each other, thus producing a
multiple X-Y plot.
Optional:
Lines each beginning MINX: or MAXX: or XINC: or MINY: or
MAXY: or YINC: specifying the minimum or maximum values
for the X or Y axis, or the value of the increment
between ticks on the axis and numbered points on the
scale. These lines have the same effect as the values
which are input from the "Axes" menu.
Optional:
Lines beginning TITLEF: followed by three numbers
separated by commas specifying the X and Y coordinates
and rotation of a floating title, followed by a comma and
the title itself.
Optional:
A line beginning KEYPOS: followed by a number from 1 to 5
specifying the position of the key.
Optional:
A line beginning SHADE: followed by a number from 0 to 10
specifying the shading value to use.
Optional:
A line beginning with any of the subsequent keywords
followed by either ON or OFF to indicate whether the item
referred to should be displayed or not: MAINTITLE:,
MAINXTITLE:, XTITLES:, YTITLE:, FLOATTITLES:, XAXIS:,
YAXIS:, XTICKS:, YTICKS:, XSCALE:, YSCALE:, MEAN:, XONY:,
YONX:, KEY:, or THREED:. The default values for these
parameters depend on the type of data grouping used.
MEAN:, XONY: and YONX: refer to the mean and regression
lines. THREED: refers to whether the "three-dimensional"
display is used.
When a graph file is saved from EASIGRAF then all these
lines will be written, so it is possible to check the
format by reference to such a file. The example files
supplied for use by the GRAFDEMO demonstration can also
be referred to.
12:2. Example graph file
Here is an example of the a valid graph file which
illustrates some of the features specified above:
PARMS:V
TITLE:First title line
TITLE:Second title line
TITLEV:Vertical title up Y axis
TITLEG:Title for column variables
107
Format of graph files
TITLEG:First column title
TITLEG:Second column title
TITLEG:Third column title
2,1+2,3:First row title
4,8,4:Second row title
27,OMIT,6:Third row title
7,14.7,7:Fourth row title
4,,9:Fifth row title
MINX:0
MAXX:18.5
XINC:1
MINY:0
MAXY:27
YINC:2
DATATYPE:XY2,1
DATATYPE:XY3,1,-0.5
TITLEF:0.1,0.1,0,Here is a floating title
TITLEF:0.2,0.2,90,Here is another
KEY:ON
THREED:ON
The first line specifies that the graph will be drawn as
a vertical bar chart. The graph title lines and column
titles follow. Since there are four TITLEG: lines then
three columns of data will be expected. Five rows of data
follow, each followed by its own title. It can be seen
that the first row contains a simple arithmetic
expression, 1+2, and the third row contains the OMIT
keyword which would produce a break in the line if a line
graph were drawn instead of a bar chart. In the fifth row
the second value is missing. Minimum and maximum values
for the axes are specified next, with a distance of 1
between ticks on the X axis and a distance of 2 between
ticks on the Y axis. The first DATATYPE line means that
values from the first column are to be plotted against
values in the second column. No column is specified to
provide Z values so the default of a constant value of 1
will be used for all Z values. The second DATATYPE line
means that values from the first column are to be plotted
against values in the third column. The value of -0.5
means that a constant of 0.5 will be used for all Z
values. Since a vertical bar chart is being drawn, this
means that the width of these bars will be 0.5. Two
floating titles are specified, with origins at 0.1,0.1
and 0.2,0.2 using the screen coordinate system (i.e.
ignoring the scale of the X and Y axes). The first has a
rotation of 0 and so is written horizontally, but the
second has a rotation of 90 degrees and will be written
vertically. The last two lines specify that the key
should be displayed and that the three-dimensional option
should be used, which for a vertical bar chart means that
the bars are displayed as solid blocks.
12:3. Compatibility with
PCG2
PCG2 is a graphing program supplied with the Shareware
database PC-File. You may wish to use this program
instead of EASIGRAF to display some of your graphs
because it can produce pie charts and better looking
titles, and can output PostScript. All the lines above
108
Format of graph files
which appear before the table of data values are
compatible with PCG2 except for the PARSE line. The data
values themselves are also compatible provided that
numbers are entered rather than arithmetic expressions
and that there are no missing values, and provided the
OMIT keyword is not used. All lines specified after the
data value table are not compatible with PCG2 and would
need to be deleted before the file could be displayed
using PCG2. Note that to use PCG2 the file must actually
have the name GRAPH.ME.
109