This program is the second part
of the AUTOCAR listing in issue 15 although with appropriate amendments
the graph functions could be used in other programs.
This program is loaded and run
from the main AUTOCAR program by selecting item two from the special
calculations menu. It should be saved to disk using SAVE "D:GRAPH".
Please note that there must be at least three entries in the data
before the program will produce any graphs worth studying. All the
graphs produced are of the 'LINE' type.
PROGRAM OPERATION
When graphical analysis is selected,
the program will display, 'LOADING DATA MENU'. When the program
has loaded it will display, 'LOADING DATA'. The program will load
data from the data file. Then 'CALCULATING PLEASE - WAIT' will appear.
The screen will then be turned off while the program calculates
all plot points and ratios to fit into a graphics 24 display. The
length of this time will be approximately one to two minutes. When
the process is complete, the menu will appear.
There are two graphs in this routine
... 1. PRICE/GALLON AND MILES/GALLON and 2. PRICE/PINT AND MILES/PINT.
PLOT OPTIONS AND AXES
For each set of two graphs there
are two options. The first is shading. If this is chosen the program
draws vertical lines from each plot point to the horizontal axis.
The purpose of this is that each point plotted can be traced to
the scale on the vertical axis and the value read off it. The second
choice is to plot each graph separately, or on the same axis. If
it is chosen to plot both graphs on the same axes, then the shading
option is not as effective.
The vertical axis scale for the
first graph will appear on the left side of the screen while the
scale for the second, will appear on the right. All the scales are
calculated by the program, with reference to the data. The horizontal
axes are divided evenly into the number of plot points, and represents
time, or distance, between fill ups. As more data is entered, the
program will continue to divide up the horizontal axes, to allow
for the number of plot points. Please bear in mind then that as
the number of entries grows the plotted points will become closer
together. This means that there is a limit to the number of plot
points that the program can handle. In its present form the maximum
number of entries is two hundred, which means 199 plot points. If
you wish to increase this number then beware, the program may crash
or a point will be reached when the plot will not be clear.
The graphics routines presented
in this program actually give the plotted form of the figures displayed
by the COST ANALYSIS section of the SPECIAL CALCULATIONS option
from the main menu of the AUTOCAR program.
EPSON PRINTER DUMP
To the prompt HARD COPY (Y/N) answer
'N' if you do not have a dot matrix printer. The routine uses bit
image mode to dump the screen to the printer.
|
|
|
top