@database graphwrite.guide
@width 80

@node main "GRAPHWRITE GUIDE"

@{B}            GRAPHWRITE IS PROGRAMMED BY:

@{I}                     POMPEI LUCA

                       Address:
@{UB} @{UI}            Via Togliatti 47 - 40026 IMOLA (BO) (ITALY)
                     Tel. 39-542-640056
                FIDONET ADDRESS: 2:332/405.23
                EMAIL   ADDRESS: rpmpo@mbox.queen.it

                Graphwrite file can be found in:

                IDCMP BBS  ++39-542-25983 / 2:332/405.0 FIDONET
                            2400 to 28800 baud

                AMINET:
                directory MISC/SCI

                MY HOMEPAGE (ftp link):
                http://www.geocities.com/SiliconValley/Lakes/4277

                                see for  GRAPHxxx.LHA


EXCUSE ME FOR MY BAD ENGLISH!!!!!!!!!

*****************************************************************************

PUBLIC DOMAIN VERSION.

*****************************************************************************

@{U} GRAPHWRITE USE INSTRUCTION@{UU}

@{"INSTALLATION" link install }
@{"CONFIGURATION" link configura }
@{"WHAT'S THE PROGRAM CAN DO?" link serve }
@{"FILE INPUT FORMAT" link formato }
@{"DOS INTERFACE" link lancio }
@{"MENU DESCRIPTION" link menu }
@{"FITTING" link fitting }
@{"OUTPUT WINDOW" link output }
@{"ENCAPSULATED POSTSCRIPT OUTPUT" link eps }
@{"USING GRAPHWRITE" link uso }
@{"AREXX INTERFACE" link arexx }
@{"COPYRIGHT" link copyright }
@endnode

@node install
INSTALLATION:
--------------
You must make a directory es. GRAPHWRITE and explode the compressed file in
this directory, after you copy the contents of the directory Gfont in FONTS:.

N. B. reqtools.library for os 2.0 must be present in LIBS: directory.
@endnode

@node serve
WHAT THE PROGRAM CAN DO?:
-------------------------
The program is a X/Y charts creator with fitting possibility, from
ASCI file input.
It is possible to make, to lay, to print, to fit and to export charts.
@endnode

@node formato
INPUT FILE FORMAT:
----------------------

Graphwrite can handle two different file-format:
ASCII and CSV.

Input ASCII:

Input data file in ASCI form must have the above format:

x1 y1
x2 y2
x3 y3
x4 y4
.. ..
Xn Yn

Input CSV:
This format is the export standard for spreadsheet (procalc etc.)
The format for CSV file must be:

"x1","y1",
"x2","y2",
"x3","y3",
....,....,
"xn","yn"

Is very important the file is free from any other text so you must
export from the spreadsheet program only the data block (must be
two columns for x and y and any amount of rows).
@endnode

@node lancio
@{B} ************ DOS INTERFACE ************* @{UB}

The program can be started from shell and is possible to specify a command line.

@{U}command line sintax:@{UU}

GRAPHWRITE [filename] [COMMAND1 data COMMAND2 data ....]

@{B}COMMANDS:@{UB}
MAX <xmax> <ymax> specify   the    max of x and y axis
MIN <xmin> <ymin>    "      the origin  "    "   "   "
TITLE <title>        "      charts title
NOTE <note>          "      charts note
LEG <string legend>  "      charts legend
MAXTIK <x> <y>       "      the step of numbered axis tik
MINTIK <x> <y>       "      the step of unnumbered axis tik
MAXGRID              "      the numbered axis tik grid
MINGRID              "      the unnumbered axis tik grid
CONFIG <configfile>  "      the configuration file used by graphwrite. The
                            configuration files are generated by the program.

Es.

>graphwrite dati MAX 3 1 LEG string TITLE abcd

when program start, it load file "dati" and draw the chart with
the supplied title ("prova") and legend ("stringa");
the axis max vale are 3 (x), 1 (y).

also:

>graphwritemain dati CONFIG myconfig

The prog. load the datafile "dati" and use the configuration file "myconfig"
for parameter.

The program can used as charts module for your programs.

for example ( C code ):
.......
system("graphwrite datafile commands .....");
.....
ecc.

Now try to doubleclick on the "example" icon, for start the program with
datafile "dati1" and configuration file "config2".
@endnode

@node menu

**************** PROGRAM MENU ******************


                @{"PROJECT" link project }
                @{"PARAMETER" link parameter }
                @{"GRAPH" link graph }
                @{"OTHER_FUNC" link other }

@endnode

@node project
PROJECT MENU:
-------------
LOAD:
load a datafile.

EDIT DATA:
edit the current datafile (current dataset).
The c:ed editor are used.

DATASET:
let you to specify in what dataset you want to operate (load, edit ecc.).

DEL DATA:
Erase current dataset (specified by dataset command).

PRINT:
print to printer or ILBM file the current chart.

PLOT:
Plot the charts with encapsulated postscript (EPS) format in a file.

ABOUT:
Program about.

QUIT:
exit program.
@endnode

@node parameter
PARAMETER MENU:
---------------

@{"CONFIG:" link config }
@{B}ORIGIN:@{UB}
X:
X axis origin
Y:
Y axis origin
default is 0 0 .

@{B}SCALE:@{UB}
XMAX:
insert xaxis max value.
YMAX:
insert yaxis max value.

If not specified are used the max value of x and y in all the datafile 
loaded.

@{B}UNITS:@{UB}
open a window for insert the measure unit of the axis tik and the
relative grids.

@{"FIT:" link fit }

@{B}POINT:@{UB}
you can change in the current dataset circle, rectangle, asterisc or none
as data point indicator.
Also you can change her sizes.

@{B}LINETYPE:@{UB}
you can change in the current dataset the line charts linetype.

@{B}COLORS:@{UB}
to change color of dataset.
@endnode

@node config

@{B}************* CONFIG ****************@{UB}

LOAD config:
Load a program configuration file which contains all the menu modifiable
parameter.

SAVE config:
Save the current program configuration in a file.

P.S. you must don't include the char "@" in all the charts text (title, note
     .....) because this char is used by the program during his work.
     If you write in a chart text the char "@" and save a configuration file,
     when you try to load this the program fail the operation.
@endnode

@node fit
@{B}**************  FITTING  ***************@{UB}

P.S. Fittings are performed on the current selectioned dataset.

Select:
-------
Open a window in which is possible select one of the 22 fit-functions
available in the program.
FUNCTION N. 20 polinomial fitting:
Is opened a requester in which you must write the polinomial Degree (max 9).
Best polinomial fit:
Inserting a 0 degree is calculated the best correlation polinomial degree
(correlation 1 is the best, this function can determine higher polinomial
degree).
After are visualized the calculation data, clicking "print" in requester
the polinomial data are printed.
FUNCTION N. 21 lagrange interpolation:
A N degree lagrange polinomy is used, N is the number of the interpolation
point.
Lagrange interpolation is very good in the middle data point but fail at the
chart x extremum.
FUNCTION N. 22 interpolation by spline:
This interpolation is very good to interpreter data point.

Best-fit:
---------
The program calculate what is the function (no 20, 21, 22) whith the
best correlation coefficient.

Calculate:
----------
The program ask you a X value and show to you the relative Y value of
the fit function for this x value.

Save curve-fit:
---------------
You can save the point of the interpolation curve of the current dataset
in a file ASCI of x/y data.
Is asked you the name of output file, the X initial value, the X final value
and the number of curve point to save.

Integrate:
----------
Allow you integration (trough simpson rule) of the curve-fit between your
supplied integration limits (X0,X1).
@endnode

@node fitting

Fitting is a matematic procedure which allow you to determine a matematic
function which is rappresent the point (datafile) loaded.
That function can be displayed with the datafile point for see the difference.
see @{" FIT: " link fit } for more.
@endnode

@node graph
@{B}***************** MENU GRAPH: *******************@{UB}

KIND:
Only x/y charts for this version.
In a future i will include bar, pie, ... charts.

TITLE:
Let you insert title text and change Titlefont.

NOTE:
Let you insert note text and change notefont.

AXIS:
Let you insert x/y axis text and change his font.

LEGEND:
Let you insert legend texts and change his position.

DRAW:
Draw the chart.

@endnode

@node other
@{B} ******************** MENU OTHER_FUNC *******************@{UB}

STDDEV:
calculate the standard deviation for the current DATASET

VARIANCE:
calculate variance for the current DATASET

INTEGRATED CURVE:
generate the integrated curve of the current DATASET and put it
in a successfully selected DATASET or in DiskFile

DERIVATED CURVE:
generate the derivated curve of the current DATASET and put it
in a successfully selected DATASET or in DiskFile

HELP FOR ...:
OnLineHelp, after the selection of this you have to click on the
desired gadget, menu or part of graph to have the description of
this.
@endnode


@node output
@{B}********   OUTPUT WINDOW:  ********@{UB}

Gadget "draw","load","dataset","fit" in the output window let you to
draw chart, load data, change current dataset and select a fit function.

-Modify the chart:

Clicking on the chart components you can open the relative modify window.

ex.
Clicking on the axes are opened the units window (see menu command UNITS).
@endnode

@node eps
@{B}********* ADOBE ILLUSTRATOR 1.1 OUTPUT ***********@{UB}

Selecting the menu command PLOT you can save the chart in a file with
adobe illustrator 1.1 format.
With this option you can import graphwrite chart from dtp prgram and
others.
See @{"FONT:" link font }
@endnode

@node font

@{B}*********  FONT: **********@{UB}

GRAPHWRITE use a Bitmap font, the font supplied with that program in a
directory gfont if copyed in FONTS: and used for charts permits you to use
stndard vectorial font supplied with art-expression program, when you
import a EPS file generated by Graphwrite.

New font installation:
-------------------------------
For compatibility with art-expression you must install two kind of font.
One is vectorial and used by art-expression (Adobe type 1) and one is Bitmap
used by system.
You must Copy the bitmap font in directory FONTS: and the vectorial font
in the art-expression fonts directory (Aefonts).
The two kind fonts must have the same name for graphwrite (currente name in
FONTS:) and for art-expression (name present in a fontlist file used by
prog.).
ex. bitmap font = Times.font, vect font = TI.pfb (normal),
TIB.pfb (bold), TII.pfb (italic), TIBI.pfb (bolditalic) the art-expression
fontlist must contain:
........
TI.pfb Times
TIB.pfb Times-Bold
TII.pfb Times-Italic
TIBI.pfb Times-BoldItalic
.......
Uppercase letter are important.

@endnode

@node uso
@{B}**********************   GRAPHWRITE USE   ****************************@{UB}

Making first chart:
-------------------

-load graphwrite program.
-select LOAD and select "data" file
-select DATASET and click on "2"
-select LOAD and select "data1" file
-select DATASET and click on "3"
-select LOAD and select "data2" file

click on DRAW gadget

Now you can change parameter and more......

If you click on the chart, @{"see output window" link output }

If you want to use graphwrite as extern drawing module see 
@{"start from dos" link lancio }.

@{"Click here if you want draw a chart" system "graphwrite dati1 CONFIG CONFIG4" }
@endnode

@node configura
@{B}**********************   GRAPHWRITE CONFIGURATION   ****************************@{UB}

Load (double clicking his icon) program "graphconfig".
Graphconfig allow you to change screen mode and the menu font of graphwrite.
Exiting from program the new configuration are saved in a file "graph.config"
which must be present in the same directory of graphwrite.
@endnode

@node copyright
@{B}   Copyright and other legal stuff
   ===============================@{UB}

   Copyright (c) 1994-97 POMPEI LUCA

   Permission is granted to make and distribute copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   No guarantee of any kind is given that the programs described in
this document are 100% reliable. You are using this material at your
own risk. The author @{i}can not@{ui} be made responsible for any damage which
is caused by using these programs.

   Permission is granted to include this package in Public-Domain
collections, especially in Fred Fishs Amiga Disk Library (including
CD-ROM versions of it).  The distribution file may be uploaded to
Bulletin Board Systems or FTP servers. If you want to distribute this
program you @{i}must@{ui} use the original distribution archive @{b}graphwri.lha@{ub}.

   @{i}None@{ui} of the programs may be included or used in commercial programs
unless by written permission from the author.

   @{i}None@{ui} of the programs may be modified in any way. This especially
includes changing the copyright notices or removing any of the ShareWare
restrictions.

   @{i}None@{ui} of the programs may be used on any machine which is used for the
research, development, construction, testing or production of weapons
or other military applications. This also includes any machine which is
used for training persons for @{i}any@{ui} of the above mentioned purposes.
@endnode


@node arexx

@{B}              AREXX INTERFACE

Graphwrite can accept the following arexx commands:

AREXXPORT= GRAPHWPORT

COMMAND   PAR    DESC

LOAD  filename N   load file named filename; (filename must be in the same
                   directory of graphwrite);  N=filetype: 1=ASCI 2=CSV

DRAW               draw graph

DATASET   N        select the current dataset N
TITLE     string   change the title of the graph
NOTE      string      "    "  note   "  "    "
XTITLE    string      "    "  x_axis title
YTITLE    string      "    "  y_axis title
LEGEND    string   change the title of the current dataset inside the legend
LEGENDPOS N        N: 1=top_right 2=bottom_center 3=top_center 4=extern_right
COLOR     N        N = color number for the current dataset
MINTIKX   N        distance between the smaller axis tik
MAXTIKX   N           "        "  "  "  greather "     "
MINTIKY   N           "        "  "  "  smaller  "     "
MAXTIKY   N           "        "  "  "  grather  "     "
MAXX      N        change max for x axis
MAXY      N          "      "     Y  "
MINGRID   N        minimum GRID: 1 activated; 0 disactivated
MAXGRID   N        maximum GRID; 1   "        0    "
ORX       N        x axis origin
ORY       N        y axis origin
FIT       N (N N)  select fitting function:
                   N=type of fitting function (0=bestfit, 1->22= fnc, 23=none)
                   if N=20 (polinomial) you have to add polinomial degree (0->9)


if you want see an example of arexx-script double-click on the icon REX
(be sure graphwrite is started)

@endnode



