This book describes a system of program modules that can be used to create a wide range of graphs and charts in a professional way for presenting data supplied by the user. The program modules will be referred to as the Graphs and Charts Pack, and have been designed to run on the BBC Microcomputer Model B. A listing of the component modules is given at the end of this book. A cassette is also available.
The Graphs and Charts Pack makes full use of the powerful and versatile graphics facilities of the BBC Microcomputer. It is nevertheless constructed in such a way that relative newcomers to computers and programming will be able to use it with ease.
You can get a general impression of what you can do with the Graphs and Charts Pack by glancing through the book to look at the examples. Notice that the programs are divided into three main sections: Level Three, Level Two, and Level One.
It is the provision of levels that makes the Graphs and Charts Pack easy to use, yet allows the BBC Microcomputer's graphics to be used to the full.
Level Two contains procedures and functions which you can use as part of your own program. They are designed so that apart from setting data, users make only one FROG call in their progam in order to obtain a picture. The data can be in any units that the user pleases , there is no need to use the screen coordinates understood by the BASIC statements PLOT, MOVE or DRAW. At this level the package is therefore very easy to use.
Level One also consists of procedures and functions that you can use in your own program, but they give you much more freedom to achieve special effects. As in Level Two, users can work in any units that they please.
Using the Level One and Level Two routines it is a simple matter to build up programs for the interactive creation from the keyboard of graphs, charts, or plots of mathematical functions. The Level Three section of the book describes what such a set of programs might be, and these are included in the Graphs and Charts Pack.
Levels One and Two are fully compatible with the screen control facilities provided by the BBC Microcomputer - the user is free to continue to use these alongside the routines.
The examples presented in the manual can be used directly on the BBC Microcomputer Model B, after loading the appropriate Level One and Level Two routines.
Level Three programs, as explained above, are complete and ready to use, so they are provided on the cassette as BASIC programs in normal 'SAVE/LOAD' form. For example, to run the bar chart program, enter:
CHAIN "L3-BAR"
in the usual way and start the cassette recorder playing.
This simple method cannot be used for Levels Two and One, however, because LOAD and CHAIN delete any program in the computer's store before bringing in the new one. As the purpose of Levels Two and One is to form part of your program, another way must be used. This is provided by the '*EXEC' command: this causes programs on the tape to be transmitted to the computer rather as if you were typing them in yourself quickly. Each line of input starting with a line number is then accepted by the interpreter as a new line to be added to your program. As a consequence, the program code from the tape will appear on the screen as it is read in. For example:
> *EXEC "Ll-2D"
You will also need to know which line numbers the Graphs and Charts Pack routines will use. They are all in the range 10000 to 20000. More precise information is given later.
To avoid any possible confusion between the lower case 'l' and the numeral '1', no lower case 'l's have been used in variable or procedure names, except in 'lo' and 'l%'.