@database ???? @master ???? @width 80 @width 76 @node Main "Table of contents" ============================================================================ AGraph 36.0 Copyright (C) 1995 by Denis GOUNELLE ============================================================================ Any commercial usage or selling without author's written authorization is strictly forbidden. You can copy and spread this program under the following conditions: 1. All the files must be provided 2. No file must be modified 3. You can't charge more than $6 for the copy In spite of several tests, no warranty is made that there are no errors in AGraph. YOU USE THIS PROGRAM AT YOUR OWN RISK. In no event will I be liable for any damage, direct or indirect, resulting of the use of AGraph. @{"Introduction" Link "Introduction"} @{"Installing AGraph" Link "Installation"} @{"Starting AGraph" Link "Arguments"} @{"Input files format" Link "InputFiles"} @{"Menus description" Link "Menus"} @{"Using AGraph with ARexx" Link "ARexx"} @{"Technical informations" Link "Technical"} @endnode @node Introduction "Introduction" AGraph is a small but quite powerfull program, which aim is to draw graphics like pies or histograms. It allows five types of graphics (most of them may be declined into various modes), has an AREXX port, and can save the graphics as a regular IFF ILBM file. Criticisms and suggestions will always be welcomed. Write to: M. GOUNELLE Denis 27, rue Jules GUESDE 45400 FLEURY-LES-AUBRAIS FRANCE You can also send a message to "gounelle@alphanet.ch". Note that this mailbox is not mine, so please send only short messages. As I don't have direct access to the messages, don't expect an answer before a month. @endnode @node Installation "Installing AGraph" To install AGraph, just copy the executable file to any directory in your path. The program requires a Kickstart V36 or higher. AGraph is provided in two versions: one that will run on any Amiga, the other optimized for Amigas with at least a 68020 CPU and a 68881 FPU. AGraph is localized, so it can adapt itself to your favorite language. All you have to do is to copy the good catalog file into the directory corresponding to your language. For exemple, if your default language is french, copy the "francais.catalog" file under the name "AGraph.catalog", into the "SYS:Locale/Catalogs/Francais" directory. @endnode @node Arguments "Starting AGraph" The program may be run either from the Shell command line, or from the Workbench. In both cases, it only accept a single optional argument, which is assumed to be the name of the input file to use. If no argument is specified, a file requester will appear, so that you can select the input file. If you cancel this requester, the program will stops. @endnode @node InputFiles "Input files format" This section describes the format of AGraph input files. These files are simple text files, which hold the data and parameters that are needed to draw the graphic. The general format of the input files is: ; comment line AGRAPH OPTIONS OPTION1=value OPTION2=value and so on... DATA TitleOfColumn1,TitleOfColumn2,... TitleOfLine1,DataAtLine1Column1, DataAtLine1Column2,... ... Empty lines and comment lines are ignored. The first line which is not a comment or an empty line must start with the "AGRAPH" keyword. As you can see, input files are divided in one or two sections : - the OPTIONS section, which is optional, allow to overwrite default parameters settings, like the screen mode to use or the type of graphic you want. - the DATA section, which is required, holds the data for the graphic. OPTIONS and DATA sections may appear in any order. It is strongly suggested that each option and data line begins with at least one space or tabulation character. @{"List of possible options" Link "OptionsList"} @{"A small example of input file" Link "Example"} @endnode @node OptionsList "List of possible options" DEPTH=n Use a screen of "n" planes. If "n" is different of the number of planes of the Workbench screen, a custom screen will be opened. This screen will have the same mode as the Worbench screen, unless the DISPLAYID option is specified. Example: DEPTH=3 DISPLAYID=screenmode Opens a custom screen, with the specified screen mode. Example: DISPLAYID=0x29004 FONT=fontnameY Specifies the font to use, instead of the default text font. Example: FONT=topaz8 LEGEND=RIGHT|BOTTOM|NONE Specifies the location of the legend for the graphic. Default value is RIGHT. Example: LEGEND=BOTTOM MODE=PERCENT|HORIZONTAL|BACKDROP|NOAXES Specifies the graphic's mode. You can specify a list of modes, separated by a comma (see example below). If a mode is not suitable for the current graphic's type, it will be ignored. In PERCENT mode, the AREA, CUMHISTO and PIE graphics transform all data values in a percentage, relative to the sum of all the values in the same column. In HORIZONTAL mode, X and Y axis are inverted for the STDHISTO and CUMHISTO graphics. In BACKDROP mode, AGraph always opens a custom screen, and output windows are backdrop windows which can't be resized. You can specify the mode of the custom screen with the DISPLAYID option. In NOAXES mode, AGraph doesn't draw vertical (or horizontal in HORIZONTAL mode) axes. Example: MODE=PERCENT,HORIZONTAL PALETTE=0xRGB,0xRGB,... Specifies the colors to use for the current screen. If AGraph is working on the Workbench screen, the initial palette will be restored when the program will end. Example: PALETTE=0xAAA,0x000,0xFFF,0x68B STARTPEN=n Specifies the starting color to use. This color will be used for the first row of data. Default value is 2 (white in standard palette). Example: STARTPEN=3 TITLE=window's title Specifies the title of the output window. Default value is the input file's name. Example: TITLE=Sales curve TYPE=CURVE|AREA|PIE|STDHISTO|CUMHISTO Specifies the type of graphic to draw. STDHISTO stands for "standard histogram", CUMHISTO for "cumulated histogram". Default value is CURVE. Data values must have the same sign for AREA and PIE. Note that PIE uses only the first column of data. Example: TYPE=PIE YSCALE=n Specifies the graduation step on Y axis. If omitted, AGraph will show 0, minimum and maximal values. Example: YSCALE=2.5 @endnode @node Example "A small example of input file" ; ; Example file for AGraph ; AGRAPH OPTIONS FONT=times11 TITLE=Sales curve YSCALE=10 TYPE=STDHISTO DATA 01/94, 02/94, 03/94, 04/94, 05/94, 06/94, 07/94, 08/94 Joe, 11.12, 3.49, 0.13, 2.29, 3.20, 9.13, 2.23, 3.24 Jack, 22.57, 30.44, 17.21, 10.48, 36.36, 63.11, 25.55, 24.41 William, 50.49, 42.08, 43.13, 9.36, 13.52, 37.06, 24.32, 15.19 Averell, 0 , 0 , 51.40, 1.55, 7.24, 4.37, 0.33, 0.25 @endnode @node Menus "Menus description" Once an output window is opened, AGraph adds two menus to this window. The "Project" menu has the following items: Open... Loads a new input file. A file requester will appear, so you will be able to select the file to load. Save as... Saves the current graphic as an IFF ILBM file. A file requester will appear, so you will be able to specify the name of the output file. About... Displays some informations about the program and the author. Quit Terminates the program The "Mode" menu has the following items: Area Curve Cumulated histo. Standard histo. Pie Changes the graphic's type. Some types may be disabled, if the current data does not allow to display them. Percent Toggles PERCENT mode. Horizontal Toggles HORIZONTAL mode. No axes Toggles NOAXES mode @endnode @node ARexx "Using AGraph with ARexx" AGraph has an ARexx port, which name is "AGraph_rexx". The port is open when the program starts. If it can't be opened, an warning message will be displayed. The commands that are accepted are: MODE new mode MODE modes list Changes the mode of the current graphic OPEN filename Loads a new input file PALETTE 0xRGB,0xRGB... Changes the palette of the current screen SAVEAS filename Saves the current graphic as an IFF ILBM file, which name will be "filename" TOFRONT Bring current screen to front TYPE new type Changes the type of the current graphic QUIT Terminates the program All these commands return 0 if successful, 10 if an error occured, 20 if a fatal error occured. In this last case, the program immediatly terminates. @endnode @node Technical "Technical informations" Language used C language only. Compiler used SAS/C 6.51. Source code size 112638 bytes, 4695 lines, 24 modules. Developpement machine Amiga 3000 25Mhz with 10Mb RAM, 160Mb hard disk, OS 3.1. Developpement time Less than 40 hours (for v36.0) @endnode