Business Graphics - John Tydeman (Your Spectrum-No.7-Page 63) With the QL looming so high on the micro horizon, many of you out there must have looked at the bundled software that comes free with the machine with something akin to envy. Well, don't fret ... here's a program which can produce graphs and charts, a la Easel. This package will allow you to create graphics of any data you care to type in; several formats are offered, including block line graphs, bar charts, straight line graphs, bar charts and histograms. You can also fill above and/or below the graphs with colour, either as a solid fill or 'hatching'; there are 17 different shades of 'hatch' allowed. Once the graph/chart has been drawn, you can overlay another of similar or different format, add labels (letters only can be positioned anywhere on the screen), SAVE it to tape, COPY it to a printer or start again - the choice is yours. The program comes complete with comprehensive instructions on how to enter data, and is menu-driven to boot. A word of advice though, to start with don't try to draw too many graphs at once; it's something that needs a little planning to achieve the best results. Also, be restrained in the use of colour and 'hatch' options until you're familiar with the program, otherwise it could lead to some confusion. If the filling in options runs too slow for your purpose, try speeding them up with the Softek FP Compiler - you'll find it's fully compatible. Lines 90-310 Define certain variables, POKE in a keyboard bleep, set the screen attributes and clear the screen. Lines 590-660 Print the main menu, offering a choice of five graphs or instructions. Lines 700-702 Select the type of graph; if you choose option six (instructions), the program GOSUBs to line 8900. Lines 703-750 Select the grid type and colour. Lines 760-1020 Input values for vertical and horizontal scales, clear the screen and draw the graphs with scales. Lines 1025-1095 Input graph and scale titles, the chosen colour, and print them justified on the screen. Lines 3000-3065 Input horizontal and vertical values, and the number of divisions/entries. This routine then prints the markers. Lines 3067-3070 GOSUB to draw the type of graph selected. Lines 3200-3350 Once the graph is drawn, you are offered a number of options: 1) Is shading required above and/or below the graph; 2) Is another graph to be overlayed?; and finally, 3) Is the graph to be SAVEd to tape? Line 3400 The end of the program. Lines 3690-4085 Get the colour of graphs 1 and 2. If graph 2, the program skips lines 4005-4210 which are for graph 1 only. Line 4090 Rejects data if outside the program's range. Line 4100 Draws part of the graph. Lines 4105-4210 This routine provides an option to delete the last entry. The use of '1/10' and not '0.1' is to enable the use of Softek's FP Compiler. Lines 4500-4700 This routine controls the drawing of graph 2. Notice the PEEKs in line 4571, which address the system variables to delete the last point plotted. Lines 5000-5220 The routine controlling the graphic construction of graphs 3 and 4. Lines 6000-6200 The routine controlling graph 5. (The first part of lines 6160, 5100, 4571 and 4104 is the same, should this have been in the subroutine?) Lines 6205-8360 The fill routines. (These fill above and below the graph and are very slow. If you are going to use them a lot you may like to speed them up a bit. Try placing them at the start of the program.) Lines 8590-8800 Add labels to the completed graph. Lines 8630-8670 check for the cursor keys being pressed and move the cursor. Line 8700 inputs text at the cursor. Lines 8900-8970 The first page of instructions; these are printed page by page. Notice how lines 8920, 8960 and 8970 appear five times - the use of a subroutine would have been much better.) Lines 8980-9030 Page 2 of the instructions. Lines 9040-9100 Page 3 of the instructions. Lines 9110-9140 Page 4 of the instructions. Lines 9150-9170 Page 5 of the instructions. Line 9200 Returns to the menu. Line 9999 The 'cassette SAVE' routine. ------------------------------------------------------------------------------ TYPE: Utility COMMENT: This info file was typed by Jim Grimwood Downloaded from: Desert Island Disks -- http://www.image.dk/~frankie/ Maintained by: Michael Bruhn -- frankie@image.dk