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
/
ESCHAP10.DOC
< prev
next >
Wrap
Text File
|
1992-06-30
|
18KB
|
397 lines
Chapter 10: RUNNING EASIGRAF
EASIGRAF reads in data from text files called graph
files. These consist of a series of values arranged in
rows and columns and some other information about the
type of graph to be drawn, the graph titles, etc. The
format of these files is explained more fully in the
chapter entitled "Format of graph files", but if you are
using EASIGRAF with EASISTAT then you do not have to
worry much about them because EASISTAT prepares files in
the correct format automatically. The program is
specially designed so that graphs can be displayed by
EASISTAT just by specifying a "G" option on some of the
commands.
EASIGRAF can organise the data read in from the file in
different ways - values can be grouped according to rows,
columns, rows and columns, or pairs of columns can be
plotted against each other. Vertical bar charts, line
graphs and scatter plots can be drawn, and there are
options to alter scaling, shading and other aspects of
the display. Titles may be added, deleted or changed.
There is also some capability to produce 3D graphs.
The modified graph can be saved to disk as a graph file
so that the next time it is displayed it will be shown in
its updated form. The graph can also be saved to disk as
a binary screendump called a Microsoft Paint file or MSP
file for short. In this form it can be printed out to a
printer using the PRMSP program. An important feature is
that if you have the Microsoft Windows program you can
use Microsoft Paint to read in the MSP file and make
further adjustments to the graph image before eventually
printing it out.
EASIGRAF is designed to use a similar format of graph
file to the graphing program called PCG2 which is
supplied with the Shareware database PC-File. This means
that for some kinds of graph you can use PCG2 instead of
EASIGRAF. The advantages of PCG2 are that it can produce
pie charts and it can generate PostScript output.
Unfortunately it does not plot Y values against X values
and it does not handle missing values in the same way as
EASIGRAF.
EASIGRAF can display graph files from any source provided
they are in the correct format. They may be produced by
EASISTAT or PC-File, or they can be typed out by hand
using the EDIT program or another ASCII text editor. One
thing that is often particularly useful is to use an
editor to make adjustments to graph files, for example to
change titles and the like, after they have been produced
by EASISTAT. Using EASIGRAF itself to alter titles is
possible but can be rather slow and awkward.
To display a graph file with EASIGRAF type:
EASIGRAF [filename]
If no file name is given then the name GRAPH.ME is used
(so typing EASIGRAF on its own if there is no file called
GRAPH.ME present in the directory will produce an error
93
Running EASIGRAF
message saying that GRAPH.ME could not be found).
If the graph file is read in successfully then it will be
displayed in its default format and the main menu will be
shown. The following options are available:
10:1. Main menu
The main menu is displayed which shows the commands
available by pressing a variety of keys detailed below.
Pressing M hides the main menu. To see it again press M
again.
10:2. Scatter chart
This is selected by pressing the S key. Each pair of X
and Y values is plotted as a point. It is possible to
change the symbols used to display the points by using
the shading option from the KEY menu.
10:3. Line graph
This is selected by pressing the L key. Each pair of X
and Y values is plotted as a point and lines are drawn
between them. It is possible to change the type of line
used by using the shading option from the "Key" menu.
Breaks in the lines can be produced by using the keyword
OMIT in the data of the graph file.
10:4. Vertical bar chart
This is selected by pressing the V key. Each pair of X
and Y values is plotted as a vertical bar. The default
width for these bars is 1, but this can be changed
setting a constant value for the Z axis (see the section
on the "Data" menu). Alternatively variable width bars
can be produced by using values from a third data column
to provide the widths required. It is possible to change
the shading of the bars by using the shading option from
the "Key" menu. The bars can be displayed as solid blocks
if the 3 key is pressed (see below).
10:5. Three dimensions
This option is turned on and off by pressing the 3 key.
The Z axis of the graph is not displayed but goes off
towards the top right corner of the screen. For line and
scatter charts points will be plotted in this dimension
also according to the value of the Z coordinate. A
vertical line is also drawn from the Y=0 plane to each
point to give a better impression of the height. For bar
charts "blocks" are drawn instead of "bars". Note that
plotting points in 3 dimensions does not affect the
autoscaling which EASIGRAF performs. Because this
autoscaling depends only on the X and Y values and not
the Z values, this means that points may tend to go off
the top of the screen. In such a situation the X and Y
94
Running EASIGRAF
scales have to be adjusted manually (by using the "Axes"
menu) to get the graph to the right proportions. If
three-dimensional plots are required the column for Z
coordinates will usually have to be selected explicitly
by using the "Data" menu, as in most cases the default Z
coordinate is a constant.
10:6. Axes menu
This is selected by pressing the A key. The X and Y axis
can be toggled on or off, as can the ticks and numerical
values showing the scale along the axes. The whole graph
can be rescaled by changing the maximum and minimum
values for X and Y, and the increment or distance between
ticks can also be altered. Enter three values for
minimum, maximum and increment separated by two commas.
None of the changes made will take effect until you leave
the "Axes" menu by pressing ENTER, at which point the
graph will be redrawn with the new values.
10:7. Titles menu
This is selected by pressing the T key. It allows all the
different titles to be turned on or off or edited. Which
titles appear where depends on the way the data is
organised as selected from the "Data" menu. For any
particular grouping this can be discovered by a bit of
trial and error, and by comparing how graphs appear on
the screen compared with the contents of the graph files.
An added complication is that the way some of the titles
are used depends not only on the type of graph as
selected from the "Data" menu, but also on whether there
are one or more groups of data to refer to. For example
EASIGRAF attempts to select the most suitable title for
the Y axis according to circumstance. If one column
provides the Y variables for a graph then the title of
that column will be used, but if more than one column
provides Y variables the vertical title (TITLEV) from the
graph file will be used instead. Similar considerations
apply to the X axis titles when there are one or more
than one groups of frequency data to display.
Special "floating" titles can also be added to the graph
- these can be made to appear anywhere on the screen and
can read left to right, upwards, downwards or upside
down. To produce a floating title first type in the
message that you wish to have appear and press ENTER and
then type in the coordinates and angle for it, separated
by commas. The graph on the screen occupies the region
from coordinates 0,0 to 1,0.6 and the floating title can
begin anywhere within this region or within a border 0.1
units wide around it. So the first value for the position
must be between -0.1 and 1.1 and the second value must be
between -0.1 and 0.7 (these values are completely
independent of the graph scale, the title should always
appear in the same position on the screen). The values
for the rotation are in degrees anti-clockwise from the
usual left to right. If the rotation is omitted it will
be taken as zero. So legitimate values to input would be
"0,0.3,90" or "0.7,-0.05,180" or "-.1,.1".
95
Running EASIGRAF
10:8. Regression menu
This is selected by pressing the R key. It allows the
mean Y value and regression lines to be toggled on and
off. In some types of graph the regression lines would be
meaningless and so they are drawn in the same place as
the mean. "Y on X" means "the regression of the Y
variable on the X variable".
10:9. Exchange data
This is selected by pressing the X key. This exchanges
the data plotted in various ways. If the data points were
grouped by columns they will now be grouped by rows and
vice versa. If they were grouped into rows and then
columns they will now be grouped into columns and then
rows. If pairs of columns were plotted against each other
as X and Y variables they will be swapped over. Note that
using this option causes automatic rescaling of the axes.
10:10. Data menu
This is selected by pressing the D key. It determines how
the data in the graph file is organised and extracted for
graphical representation. Different options are more
suitable for different types of data, and in many cases
choosing a different organisation of the data will
produce nonsensical results. Again, a little trial and
error will be harmless and instructive, and it is also
helpful to study the files used for the demonstrations.
The graph is redrawn when leaving this menu, and
automatic rescaling of the graph is always performed.
10:10.1 Group by rows and columns
This is most appropriate when the data values consist of
frequency data from a contingency table to be plotted as
a histogram. The row and column are combined to provide
the X coordinate for a point and the data value provides
the Y coordinate. The points are grouped according to the
row in the graph file. X axis titles for the groups of
points are provided by the row titles and the main X
title is provided by the overall row title (TITLEC). The
points are shaded differently according to the column in
the graph file and a key is provided linking this shading
with the column titles. Regression lines and means are
available for each group of points (i.e. all those from
the same row). An example of this kind of graph file is
HISTO.GRP, and this is the type of graph used by the
CHISQ command of EASISTAT to produce frequency
histograms.
10:10.2 Group by columns and rows
This option is the corollary of the above with the rows
and columns of the graph file exchanged. The points would
be grouped by columns and the shading and key would
indicate the row, with the column and row titles being
used appropriately. You can exchange between this
arrangement and the previous one by pressing the X key.
96
Running EASIGRAF
10:10.3 Group by rows
The X coordinate of a point is provided by the row which
the data value appears in, and the Y coordinate is
provided by the value itelf. All values in the same row
will appear in the same vertical line. It is the
corollary of the the next option, which is more generally
useful.
10:10.4 Group by columns
The X coordinate of a point is provided by the column
which the data value appears in, and the Y coordinate is
provided by the value itelf. All values in the same
column will appear in the same vertical line. The X axis
titles are provided by the column titles and a main X
title is provided by the overall column title (the first
TITLEG). The Y axis title is provided by the vertical
title (TITLEV). This kind of graph is really only clear
when displayed as a scatter chart (selected by pressing
S). It is very useful for displaying the values of
different groups of measurements, and is used in this way
by the ANOVA command of EASISTAT. The means of the groups
can be displayed, but the regression lines would be
meaningless and so are displayed in the same place as the
mean. An example of this kind of graph file is ANOVA.GRP.
You can exchange between this arrangement and the
previous one by pressing the X key.
10:10.5 XY columns
Columns of values are taken in pairs and plotted against
each other, the first column providing the X coordinate
and the second the Y coordinate. An indefinite number of
pairs of columns may be specified, and all will be
plotted simultaneously. Each pair of columns is shaded
differently and if there is more than one pair an
appropriate key is provided. If there is only one pair of
columns then the titles for the X and Y axes are provided
by the titles of these columns. If there is more than one
pair then the Y axis title is provided by the vertical
title (TITLEV) and the X axis title is provided by the
overall group title (the first TITLEG).
For each pair an optional third column can be specified
(the "Z value"). This third column determines the width
of the bars in a bar chart, allowing variable width bars
to be created. For scatter and line graphs it determines
the distance that a point is displaced towards the top
right of screen when the "three dimensions" option is
selected. If no third column is specified then all the Z
values will be equal to the default which is 1. If a
negative number is given as the third value then this is
taken to represent a constant rather than a column
number. The absolute value of this constant is the Z
coordinate for all the data points, so for example
entering 2,3,-0.5 would plot column three against column
two and all the columns would have a Z value of 0.5. The
most useful application of this is to produce bar charts
with bars of width other than 1. There is no way to
assign a negative constant Z value.
97
Running EASIGRAF
10:11. Key menu
This is selected by pressing the K key. It allows the key
to be toggled on or off or moved to a new position. It
also allows the shading of the graph to be altered. There
are five positions for the key: top-left, top-right,
bottom-left, bottom-right and centre. They are numbered
from one to five in that order. Different numbers for the
shading produce different types of point, line and bar.
These are best discovered by trial and error. Selecting a
number other than zero causes all points to be displayed
according to that number. Selecting zero (the default)
allows points associated with different variables to be
displayed differently. However there is no way to
explicitly assign different shadings to different
variables apart from this default scheme. For graphs for
which no key is appropriate, a box appears with the
message "No key". This can be turned off by toggling the
key. No changes made will take effect until you leave the
"Key" menu by pressing ENTER, at which point the graph
will be redrawn with the new values.
10:12. Files menu
This is selected by pressing the F key. It allows the
graph to be saved either as a graph file or as a
Microsoft Paint (MSP) file. If it is saved as a graph
file then all the information required to redisplay it
almost exactly as it appears on the screen will be saved,
such as the current scale and title and axis
configurations.
The graph must be saved as a Microsoft Paint file before
it can be printed out. Doing this also means that if you
have Microsoft Windows and Paint then you can edit the
graph by hand to produce a more polished product. The
newest versions of Windows Paint expects the file to be
in a format called BMP instead of MSP, but the MSP files
can still be read in provided the option to do this is
selected when using Paint.
10:13. Quit
This is selected by pressing the Q key and quits
EASIGRAF. Be sure to write any MSP files that you want
and save any changes to the graph file first.
Note that when you select an option from the menu and
then make changes, sometimes these changes will not be
apparent until you return from the option to the main
menu. It is at this point that the graph is redrawn. For
example if you wish to turn off the key you would type
"K1" to toggle the key. Nothing appears to happen.
However when you leave the "Key" menu by pressing ENTER
the graph is redrawn, this time without the key. This
sort of thing applies in several other situations.
98