home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1996
/
ARCHIVE_96.iso
/
discs
/
shareware
/
share_38
/
graph_draw
/
!GraphDraw
/
!help
< prev
next >
Wrap
Text File
|
1994-01-20
|
16KB
|
466 lines
!GraphDraw, ⌐ Chris Johnson, 1990-1994
These user notes refer to version 2 (October 1993)
THIS VERSION SHOULD BE USED ONLY WITH RISC OS 3.1 OR
LATER.
*********************************************************
ACKNOWLEDGEMENT
THIS PROGRAM WAS COMPILED USING THE DABS PRESS ARCHIMEDES
BASIC COMPILER (ABC)
THE FONT MENU MODULE IS BY JORIS ROLING
*********************************************************
What this software does
=======================
It allows the entry of the x and y values for a number of
data, and the data may then be fit to
a. best straight line
b. best parabola
c. a cubic spline curve
d. a polynomial of order up to 6
A number of options for obtaining various forms of hard
copy exist (saving as a !Draw file, or printing via any
standard RISC-OS printer driver).
Use of !GraphDraw
=================
Running the application
-----------------------
This software is fully RISC-OS compatible, and is
multi-tasking. It can be run from the desktop in all the
standard ways.
Double clicking on the !GraphDraw icon in a directory
viewer will install its icon on the icon bar. Clicking
'menu' on this icon will lead to a menu providing
Info
----
a standard information window with version number
Help
----
Opens a window displaying appropriate help. Such help
is available from other menus as well
Choices
-------
Selecting this brings up a dialogue box that
allows a range of options to be changed, and
these changes may be made permanent so
that they become the new defaults when the
application is subsequently started.
The choices should be self explanatory. The
font names and sizes can be changed. To change the
font, simply click on the name field, when a menu will
open with all the installed fonts shown, from which a
choice can be made. A range of other options
governing the way graphs are displayed are also
offered. The changes will not come into operation
until the OK button is pressed. If the cancel button
(or the window close icon) is pressed, the dialogue
box is removed from the screen, and the original
defaults remain in effect. The selection can be made
the new default by clicking on the save icon. Note
that the default file is saved within the !GraphDraw
application, therefore, if the application is being run
from a floppy disc, the filer may request the disc
containing the !GraphDraw application to be inserted
in the disc drive.
File format
-----------
Graphdraw by default assumes that data files to be
loaded are essentially in CSV format. It is
possible to change the data field separator that
graphdraw looks for in input files to TAB, space
or any other ASCII character. When graphdraw saves
a data file it always uses the COMMA as a
separator.
Quit
----
the opportunity to quit the application.
Clicking SELECT on the iconbar icon will open an
empty edit window, into which the pairs of x,y
data may be entered. This version allows a maximum
of 200 data point pairs. Full scrolling and
editing facilities are available during data
entry, by means of the arrow keys, either alone or
in conjunction with SHIFT or CTRL. Page up/down
are the same as SHIFT+arrow. One useful key
combination is CTRL+SHIFT+COPY, which will delete the
data point at the cursor and close up the rest of the
data. The function key f3 will bring up the standard
save as dialogue box (as provided also as a menu
choice).
The application can also be started by double clicking on a
data file of the correct format. In this case, besides the
icon appearing on the icon bar, the edit window will be
opened with the contents of the data file displayed, for
further editing if necessary. A data file may also be
dragged, either into the edit window, or to the iconbar
icon. The data will be loaded, overwriting any data that had
previously been entered.
Data can also be passed in either direction between the
GraphDraw edit window and a !edit window. Thus editing can
be carried out using the !edit application if preferred.
Data can be entered 'from scratch' using !edit, and then
transferred to the !GraphDraw application (by dragging a
save icon to its edit window or its iconbar icon), as long
as the !GraphDraw application can recognise a valid data
file. As the graphdraw application will deal with files
of comma separated ASCII data it is possible to set up
other applications to produce data files of the correct
form.
The !GraphDraw edit window menu
===============================
All of the data processing and data display facilities are
accessed from the edit window menu.
Clicking the 'menu' button in the edit window brings up the
following choices.
Info
----
Help
----
Clear data
----------
This will irretrievably clear the current data prior to the
entry of new data.
Save file
---------
Data files may be saved by dragging the save icon to a
directory viewer. If the full path name is set up, then you
can also click on the OK icon to save the data.
The function key F3 can be used as a short cut for this
option (unless the graph window is open, when F3 will
bring up the "save drawfile" dialogue box).
It is also possible to drag the save icon to a !Edit window,
or to the !Edit icon on the iconbar. The data is then
transferred into !Edit.
Plot points
-----------
This will simply plot a scaled graph of the data.
Additional sub-menu choices allow you to plot the data
as is, as semi-log x, semi-log y or as a log-log plot.
Join points
-----------
This plots the points and joins each point to the next
with a straight line. The log plotting options are
available as above.
Best line
---------
This will carry out a standard linear regression by the
least squares method to calculate the best fit straight line
through the data. A window will open displaying the slope,
intercept on y axis, correlation coefficient and the
standard errors of the slope and intercept. Clicking 'menu'
in this window allows the following choices.
Graph
-----
This will display a graph of the data points with the
calculated best line superimposed. Clicking 'menu' in the
graph window leads to a further set of options (see below
under cubic spline).
Print data
----------
This will send the results of the calculation to any
printer connected to the computer. The individual errors
calculated for each data point are also printed.
Parabola
--------
This will carry out a least squares fit of the data to the
equation of a parabola
y = u + vX + wX^2.
This is a useful technique for fitting data to a simple
curve. A window will open showing the calculated values of
the coefficients u, v and w. Clicking 'menu' in this window
will bring up the same two options as described above, i.e.
graph and Print data.
Polynomial
----------
This will carry out a standard polynomial fit for orders 3
to 6. Some of the higher order options may be greyed out if
there are not enough data points. Selecting a particular
order will force the program to calculate that specific
order polynomial, whereas if 'All' is selected, the program
will try all possible orders (3 to 6) and report the one
which gives the smallest deviation. A window will open
showing the results of the calculation, and clicking 'menu'
on this window leads to the same options as above.
Cubic spline
------------
This option leads to a small dialogue box, which
at present simply requests the 'fit factor' to be
specified. This value must lie BETWEEN 0 and 1. In
theory, a value of 0 will plot a straight line
through the points, while a value of 1 will force
the curve through every point. In practice these
values cannot be used, since a divide by zero
error is generated during certain matrix inversion
operations. Little is lost since a value of 0.9999
or 0.0001 will give essentially the same result as 1
or 0. Curve fitting is always very subjective, and
it is up to the user to decide what degree of
smoothing is acceptable for any particular set of
data. A value of 0.5 is an obvious starting point
for any data known to have scatter or experimental
error.
Once <return> is pressed, the spline plot will be
displayed. For this plot, it requires all the data
to be sorted in order. The program automatically
sorts the data in ascending order of x values
before carrying out the spline routine. Note
that this sorting occurs whenever any of the plotting
routines are used.
Transform X
-----------
Allows the x data to be transformed in a number of
standard ways, e.g. LOG, reciprocal. These operations
are cumulative, but it is up to the user to remember the
sequence of transformations.
Transform Y
-----------
As for transform X but on the y data.
Swap X and Y
------------
Simply interchanges the x and y data pairs.
Graph window menus
==================
Whenever a graph is being displayed, clicking 'menu' will
lead to a further range of options. Some of these are common
to all the graph types, others are specific to cubic spline.
Rather than repeat the same thing several times over, all
the common options are dealt with here.
The common options
------------------
Legend
------
This opens a window which allows you to
enter text to label the graph axes, and a title string
for the graph. Clicking on display will place the
labels on the graph, while delete will remove labels
from the graph (the text remains in memory and can be
reinstated by reselecting label and clicking on
display). Simply closing the menu will leave the state
of the labels as they were. This facility now supports
up to four font styles and super and subscripts.
The labels are dragable icons and can thus be dragged to
anywhere on the graph if you dont like the default
positions. The same labels will appear on any graph, with
the previous position being remembered. The y-axis label
may be plotted either horizontally or vertically, with
rotated text.
If data is saved after legends have been entered, then the
text is also saved, and is reloaded when the data is
reloaded.
Layout
------
This leads to a dialogue window in which various aspects
of the way the graph is laid out may be changed, e.g.
whether the axis pips are inside, outside or straddle
the axis lines, the size of the pips, whether the graph
is boxed in, and the type of symbol used for the data
points. It is now possible to over-ride certain of the
automatic plotting features (e.g. the axis range). These
aspects are under continuous development, and will be
enhanced in future releases.
Make Drawfile
-------------
A standard 'save as' dialogue box will be opened. The file
icon may be dragged to a directory viewer, or if the full
filename path is set up it is possible to click on OK. The
file saved is a Drawfile of the graph being displayed. This
file can then be loaded into !Draw for further enhancement.
It is also permissible to drag the file icon into a !draw
window to add the graph to an existing draw document, or
drag the icon to the !draw icon on the iconbar, when a new
draw window will be opened. The production of !Draw
format files means that the graphs can be loaded into
!Draw for enhancement, and can also be loaded into the
various DTP packages now available.
When it is first loaded into !draw, the whole graph appears
as one object, and may be scaled, moved, etc. as a whole.
The line thickness may be changed, etc. The objects
making up the graph may be ungrouped in the normal way.
This allows adjustment of individual parts of the graph,
or annotation. It needs care when dealing with the
individual parts of the graph, otherwise you may
inadvertantly move parts of the axis for example, or
even the graph itself, and have great trouble getting it
back to the correct place.
If you are familiar with using !draw, then it should be easy
to play around with the draw files output by !graphdraw.
If the graphdraw edit window has input focus, then the
function key F3 may be used as a short cut for this
option.
Make plotfile
-------------
This will output a data file of the points AND the
current fitted line in a form suitable for loading into
the MultiPlot application. (If only the points have been
plotted, then only the points will appear in the
multiplot file). This has the same look and feel of
graphdraw, but allows the combining of up to 6 sets of
line and point data onto the set of axes. Multiplot
deals only with the graphical display, it has no data
entry or processing facilities. It will accept plotfiles
from a number of applications besides graphdraw. Contact
the author for information.
Print Graph
-----------
Choosing this option gives a printout of the complete graph
via whichever printer driver application is installed. A
printer driver must be installed, otherwise !Graphdraw will
complain. This allows high quality hard copy to be
obtained, up to the best available resolution of the
printer used. The "Print" key may be used as a short
cut if the edit window has input focus.
Cubic Spline option only
------------------------
Interpolate
-----------
This option is available ONLY from the cubic spline graph,
and allows the interpolation of single values, or the
dumping of a range of values to the printer. Note that it is
not possible to extrapolate the spline curve beyond either
of the end points.
*************************************************************
The software referred to in these notes is NOT placed
into the public domain, but remains the copyright of
the author, Chris Johnson. It is released for
distribution by Norwich Computer Services under their
Shareware/Careware scheme, and should not be posted on
bulletin boards or circulated on any public domain
software discs, except by prior and express agreement
with the author.
Anyone obtaining this software by any means other than by
direct purchase from Norwich Computer Services, or from the
author, and making use of the software other than for trial
purposes, is requested to register with the author by
sending ú3. All users registering directly with the
author will be informed from time to time of any
significant improvements or 'bug' fixes and will be
entitled to upgraded versions of the software free of
charge at any time by sending a blank disc.
The software is supplied as is, and no warranty, either
express or implied, is given as to the suitability of the
software for any purpose.
Notwithstanding the above, the author would, of course, be
interested in hearing of any 'bugs' or any other unexpected
features, and will endeavour to correct any such 'bugs' so
reported in any future issues of this software. Suggestions
for improved features are also most welcome. Implementation
of suggestions depends of course on practicability and more
importantly, the authors spare time (I do have a full time
job!).
If you have any comments on this program, or would like to
suggest ways in which it could be improved then the author
can be contacted directly.
Chris Johnson
7 Lovedale Grove
Balerno
Edinburgh
EH14 7DR
If you have access to the JANET e-mail system then you
can try
checaj@uk.ac.hw.clust
If you wish to enter into the 'shareware' concept in the
full sense then registrations (>=ú3) will be gratefully
received by the author.
In any communication please
(a) quote the version number and date
(b) refer only to the program as issued.
(c) supply as many details as possible about the
problem, and indicate the hardware configuration of
the machine being used.
PLEASE SEND A STAMPED AND SELF ADDRESSED ENVELOPE IF YOU
REQUIRE A REPLY.
I hope you find the program of some use.
CafJ 10/10/1993