
Version 1.0 of the xygraph, htext, and barchart widgets have been
placed on barkley.berkeley.edu [128.32.142.237] in the compressed tar 
file pub/tcl/extensions/graph-1.0.tar.Z.

All widgets require Tk version 2.0 or greater.  Neither the htext nor
xygraph widget is compatible with the previous version (sorry).

	george.howlett@att.com, sani.nassif@att.com

--------------------------------------------------------------------

Copyright 1991,1992 by AT&T Bell Laboratories.

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that the copyright notice and warranty disclaimer appear in
supporting documentation, and that the names of AT&T Bell Laboratories
any of their entities not be used in advertising or publicity
pertaining to distribution of the software without specific, written
prior permission.

AT&T disclaims all warranties with regard to this software, including
all implied warranties of merchantability and fitness.  In no event
shall AT&T be liable for any special, indirect or consequential
damages or any damages whatsoever resulting from loss of use, data or
profits, whether in an action of contract, negligence or other
tortuous action, arising out of or in connection with the use or
performance of this software.


Implementation Notes:

The xygraph widget is a compromise between a structured graphics
approach (such as the canvas widget) and what a complete application
would offer.  It does not have the flexibility of the canvas widget
(it would be interesting to see what kind of plotter one could build
using the canvas widget), nor is it a replacement for your favorite
plotting tool. It doesn't have the capabilities or analysis features
one should expect (see xgobi, gnuplot, or S for further proof). It
does allow one to quickly create a plot and the ability to customize
it.  The benefit of a widget is that you can fit it to your
application's needs.

The widget has a two-level hierarchy similar to a menu. The graph is
first created and then lines are added to the graph.  There are
probably too many options. I would be interested in knowing which
features are missing, redundant, or silly. 

The postscript dump routines are naively implemented.  In particular,
the differences between the X and PS font widths is a source of
troubles.  Also, PS translations of X bitmaps are missing.

A barchart widget is also included. 

The htext widget has been completely re-implemented. As before, Tcl
commands can be embedded in a hyper text file which are evaluated when
the file is read into the widget.  However, now actual Tk widgets may
be embedded into the text, instead of the previous "pseudo-widgets".
The bulk of the recoding took a couple of evenings, but smooth
scrolling turned out to be fairly painful.  See the comments in the
code for details.  The result is a more capable widget. (I've even
used it for scrolling a spread sheet of many buttons, labels and
entries.)  It also does what it was originally designed to do, display
and scroll multi-line text without using the listbox.  The htext
widget still lacks selections.  This will probably be added in the
near future.

The biggest problem with the htext widget is that formatting the text
is painful. You are forced to play with it (lots), to get it right.
I'd like to have a fill mode.  But without reinventing the TeX or
troff wheel, I don't know of a good solution.

I've tried to make the widgets self-contained, so that one could add
either file to their specific applications without putting them into
the Tk library.  

I've included the patch to tclExpr.c to let you perform some C math
library functions within the "expr" command.  It is not mandatory
that you apply this patch, but it does make it easier to manipulate
the floating point data and coordinates.

BTW.  I found it quite easy to build widgets in Tk (especially with
the additions to version 2).  Thanks John.

--gah

----------------------------------------------------------------

Installation:

The following describes how to get and install the widgets.

0. FTP the distribution from barkley.berkeley.edu

  ftp barkley.berkeley.edu
  cd 
  binary 
  get graph-1.0.tar.Z
  quit

and untar the distribution file.

  zcat graph-1.0.tar.Z | tar -xvf - 

This will create a directory "graph-1.0" with the subdirectory
"demos".

1. Create the plotting shell "pish"

In the Imakefile or Makefile.noimake file you will probably have to
indicate where the Tcl and Tk include files and libraries can be found
on your system.  The Imakefile assumes the libraries to be in
$(XLIBDIR) and the include files in $(XINCDIR).

In addition, add the proper -D flag to the DEFINES variable to 
indicate the following.

-DNO_ALLOCA   Define this if your compiler does not have alloca().

-DNO_RINT     Define this if your C math library doesn't have rint().

-DNO_EXP10    Define this if your C math library doesn't have exp10().

The Imakefile assumes for SYSV systems all defines are needed.

The xygraph and barchart widgets have to know about HUGE_VAL. If 
this isn't defined in math.h or limits.h, you'll have to edit the
file graph.c.

If you have imake, type "xmkmf" to generate a new Makefile.
Type "make" and hopefully everything will compile.

If you do NOT have imake, you'll have to edit the Makefile.noimake
and type "make -f Makefile.noimake".

2. Test by running the demos

Go to the demo directory and create a link to the executable in that
directory.

  cd demos
  ln -s ../pish .

p[1-4] are the xygraph demos.
h[1-2] are the htext demos.
b[1-4] are the barchart demos.

3. Send bugs reports, correspondence, etc. to

	george.howlett@att.com
	sani.nassif@att.com
