V2.4, patch 2 (Dec92,JT)

fixed main() which had some problems in setting the output filter

Version 2.4 (Sept92, JT)

clipping: previously, if a point was outside the graph it was as if it
didn't exist; now, if the line mode is such that points are being
connected, then all points will be connected, but only that part of
the line that fits into the graph will be shown.

there is an experimental #size command which does 
resizing of xyplot's.  Basically "#size s [x y]" (where s,x,y are numbers)
is equivalent to commands "#h s", "#w s", "#r x", "#u y" except that
all the title and label sizes are also scaled.  The #size command can
be used in conjunction with the #h,#w, etc. commands (but the #size
must come first) to achieve very limited nesting of xyplot files.

previous versions were hardcoded with a SIZE of 4096; this has
been changed.  presumably one can get higher resolution by using
a larger number.  (i must admit, 4096 was always just fine for me)

the #define POPEN_PERMITTED is to simplify porting to non-Unix platforms;
ie MSDOS.

New options:

#cs .         (the `.' means to set to default, this
               also works with #lts, #ltx, etc.)
#lty .        (puts title inside the graph as is the default)
#lty ^        (puts title above graph)
#t            (transpose, now applies only to data following the command;
               previously it applied to all data in the graph)
#t0           (turn off transpose)
#tc           ("true clipping" as described above)
#tc0          (turn off true clipping, go back to old method)
#size s [x y] (experimental)
#show s [x y] (even more experimental -- ie, it doesn't work; it's
               kind of like a combination of #s and #size

a fairly major new option is the datastring specifier #d,
which tells xyplot which columns of a multicolumnar data set
to read; for example,

#d xy          default: first column x, second column y, other columns ignored
#d xye         equivalent to #e
#d yx          equivalent to #t
#d y           equivalent to #a
#d x..ye       the two dots here mean to ignore second and third columns
#d x.e.y..y    x,e,y can be in any order (but e is always error on y), and
               extra x,e,y's are ignored

#d0            turns off the datastring specifier, and resorts to 
               the usual #a, #e, #t, etc.  in general if one of these
               is specified as well as a #d, the #d wins.

ideally, the #d will save a lot of 'awking'  (you ask, why not
just implement #awk ??)

new gridstyle = 4; like 1 except no tick marks on the upper or left.

----------------------------------------------------------------
Notes on xyplot version 2.3 (Sept92, by JT)

biggest change is in the internals of how xyplot works;
each point, instead of carrying with it info on 
symbol size, plotting character, etc, now points to
a datastyle structure; thus many points may share the
same structure, with considerable gain in memory.

also the usual assortment of bug fixes and new features,
some of which incorporate fixes Ronnie made to the code,
since the last version.

New Features
#lw  1         (works better than before)
#alw 1         (axis line width)
#x . 100       (range of x-axis is auto below, 100 above)
#tks 1         (set tick size; negative values point out)

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

Notes on xyplot version 2.2 (2Jan92, by JT)

mostly this just fixes some bugs in the previous version,
relating to tickmarking and labeling axes.  Formerly,
a file like
   #lt bug?
   #x .6 .3 -.1
   #y .82 1.38 .1
   .35 1.35
   .4  .85
   .552 1.0
would fail to be labeled properly on the y-axis.

also, the option '-s' as the very first option on
the command line is treated to mean that output
should be in the xyplot intermediate language (xyil)
instead of unix-graphics.  this enables backward
compatibility with Ronnie's original PS version.

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

NOTES on xyplot version 2.1
by James Theiler

This version was created by combining two existing versions
of xyplot, both developed from a version last worked on by
Jim Gubernatis.  One of the existing versions was my own,
which added a few features, fixed a few bugs, and most notably
implemented command line options.  The other version was
developed by Ronnie Mainieri, who added a few features, and
fixed a few bugs, and most notably implemented an
intermediate language (instead of the old plot(5) protocol)
which could be cleanly translated into PostScript.

The structure of the directories and the setup of the Makefiles
and such is mostly Ronnie's.  This was more cleanly done than
mine, so I just borrowed his whole directory and worked from there.
I've changed a few things around, probably for the worst, but
things seem to work pretty smootly in terms of making executables
and tar files and such.

Below, I list the changes I made to Ronnie's code:

1. Implemented command line options.
This involved a little bit of hacking of the setopt() function,
and some rearranging of the main plot-making functions.  In
particular, I broke up init() into init() and reinit(), so that
a second initialization during multiple plotting doesn't 
initialize EVERYTHING.  I invented a prepare_plot()	and an
execute_plot(), since both functions do not ALWAYS occur one after
the other.  Also, I free the memory created for the data, since
it is not all needed for multiple plots.

2. Implemented include option
The "#i" option can be nested, and this
required a little restructuring of the program.  The program readin()
calls setopt() which can in turn call readin() if the "#i" is
encountered.  
The readin() function makes a string that begins with
"#" (or else "-" if the option came from a command line) instead
of the original version which stripped the "#" off.  Also, I have
a number of macros for simplifying how setopt() looks, and for
making it easy to add new features.


3. Renamed "scanner" to be "xyug" 
The point here was to make more explicit
the notion that "xyug" and "xyps" are syntactically equivalent.
Also, I modified "xyug" ever so slightly, so that if it gets no
input, it makes no output.  (Formerly, it always gave a command
to move back to the origin after it was finished, even if it didn't
do anything.)

3. Made the "scanner" program user-settable.
Instead of the -s that Ronnie had before, since now -s 
correpsonds to the superimpose option, the user can set which
scanner the program is to take; this can be done by setting an
environment variable XYSCAN equal either to "xyps" or "xyug" or
equal to "" for postscript, unix-graphics, or xylang output.

This can also be set on the command line (or in the data file
itself, though i don't see why this could ever be recommended):
	xyplot -scan xyps data.xy
to give postscript output.  Since this is nonintuitive to the
USER of the program, I have made abbreviations:

	xyplot -ps file.xy			## postscript output
	xyplot -ug file.xy			## plot(5) output
	xyplot -xyil file.xy		## xyplot intermediate language

4. Multiple files can be plotted; they are treated as if they
were one concatenated file, but with a "#" between them to break
lines.
	xyplot file1.xy file2.xy
It is possible to concatenate without the break by using the
include: thus,
	xyplot file1.xy -i file2.xy
does not put a line break between them.
If you type
	xyplot -i file1.xy -i file2.xy
the program will also be wanting something from stdin, which it
will take AFTER processing the files on the command lines.

5.  Formerly, there was anarchy about things like
like #lt persisting (so that if I put a title on one graph and then
superimpose a a second graph it gets the same title) but other
things like #h #w etc do not (so that I have to reset them every time).
It is still pretty much an anarchy (with no documentation of what
is and is not persistent), but I changed the two cases above so:
now #lt #lx #ly do NOT persist, and
	#h #w #u #r     DO persist

6. If you ask for log on one of the axes, and there are some nonpositive
numbers read in, the program now ignores them.  Previously, it would
blow up.

7. I "untabified" the entire xyplot.c program, so that only spaces 
now exist.  This is arguably inefficient in terms of computer memory,
but it keeps things lined up in different tabbing environments.

8. I hacked up Ronnie's .tex file a bit, again probably for the worst.

9. char *labs changed to char *labstr since TurboC uses labs as a
long abs() function.

10. added a few new features:
	-- #ndx and #ndy do the same thing as #nd except that they
       do it only one the x or y axis.
	-- #g 3 gives axes only on the bottom and left, not the full box
       (Note: this is a bit of a hack; 
         in this mode the ticks are still on the inside of the axes,
         and are not written for the last number)
----------------------------------

More notes:

Would probably be a good idea to be able to set a #define
so that one could remove all the popen()'s from the code;
thus, making porting to non-Unix systems a possibility.

==================================================================


