[comp.sources.misc] v16i011: Gnuplot 2.0 patch 2, 1 of 7

rjl@monu1.cc.monash.edu.au (Russell Lang) (01/05/91)

Submitted-by: Russell Lang <rjl@monu1.cc.monash.edu.au>
Posting-number: Volume 16, Issue 11
Archive-name: gnuplot2.02/patch1
Patch-To: gnuplot2.0: Volume 11, Issue 65-79

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  README2.patch
# Wrapped by eln272v@monu1 on Wed Dec 19 11:57:07 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f README2.patch -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"README2.patch\"
else
echo shar: Extracting \"README2.patch\" \(12252 characters\)
sed "s/^X//" >README2.patch <<'END_OF_README2.patch'
XREADME2.patch - some notes about gnuplot 2.0 patchlevel 2.
X
XThe major additions in this patch are parametric functions,
XX11 Motif support, new bit mapped graphics routines, and new terminal 
Xdrivers vttek (VT like tektronix emulators), hpljii (HP LaserJet II), 
Xkyo (Kyocera Laser Printer), SCO CGI.  
XFor a more complete list of the changes, see the MODIFICATIONS
Xsection below.
X
X
XAPPLYING PATCH 2
X----------------
X
XTo apply this patch copy the files README2.patch, patch2a, patch2b, 
Xpatch2c, patch2d, patch2e and patch2f to the gnuplot directory.  
XChange directory to the gnuplot directory, and then apply the patch with 
Xthe following commands:
X
X    rm term/font5x7.trm
X    rm term/eps60.trm
X    rm term/hpljet.trm
X    rm term/epson.trm
X    mv README.patch1 README1.patch
X    patch -p < patch2a
X    patch -p < patch2b
X    patch -p < patch2c
X    patch -p < patch2d
X    patch -p < patch2e
X    patch -p < patch2f
X
X    Copy the appropriate makefile.* to Makefile, READ THE Makefile
X    and make any necessary changes. Then recompile!
X
X
XMAIL ADDRESSES
X--------------
X
XThe mailing list info-gnuplot exists as a forum for discussions about 
Xgnuplot.  About the only gnuplot topic not supported by this list is 
Xbug reports.  They are handled by a different mail alias, bug-gnuplot.  
X
XTo be removed or add someone to the mailing list send mail to:
X
Xpixar!info-gnuplot-request@sun.com
X
X
XTo report bugs send mail to:
X
Xpixar!bug-gnuplot@sun.com
X
X
XTo ask a question or discuss gnuplot send mail to:
X
Xpixar!info-gnuplot@sun.com
X
X
Xpixar is a UUCP site.  sun.com is a UUCP and Internet site.  
XIn the above addresses, sun.com can be replaced by ucbvax.berkeley.edu.
X
X
XPARAMETRIC IMPLEMENTATION
X-------------------------
X
XAt the request of Bill Schulz, one of our illustrious math profs, I
Xwas "encouraged" to build parametric plotting capability into gnuplot.
XHe not only explained how much more useful parametric plotting was
Xcompared to the simpler case of function plotting, but he suggested
Xthe syntax for parametric plots as simply x,y pairs of functions on
Xthe plot line.  (He also suggested that the changes must be very easy
Xto do, but I forgive him for that bit of chicanery.)
X
XThus armed, I was surprised at the number of other issues I ran into.
XFor instance, in addition to inventing a `set parametric' command I
Xtook a hard look at xrange and yrange and decided I also 
Xneeded a trange when in parametric mode.  This, happily, led
Xto what I believe is the right behavior in all cases I have tested
Xfor parametric equations.  Indeed, I feel the implementation is
Xbetter than I originally hoped for as you can, in parametric mode,
Xcontrol the t range, x range and y range independently.  This gives
Xyou quite a bit of control over the function being plotted.
X
XIf the parametric commentary seems to be too verbose I'm willing to shorten 
Xit on command.  (I normally don't write like that--geesh!)  I'm happy to 
Xleave it alone, however, if no one finds it offensive.
XOf course, to be complete I needed an autoscale_t variable (such already
Xexisted for x and y).  The meaning of this variable, however, was a bit
Xweak.  Internally it is necessary, but from the user's standpoint,
Xit may not make much sense to have a `set autoscale t' command.  All that
Xgains the user is a chance to catch an empty trange and expand it if
Xnecessary.  How an empty trange comes into existence is a mystery
Xto me.  (Empty x ranges can occur, I guess, due to a data file or
Xbeing in polar mode.)
X
XThe trange, by the way, has an arbitrary default of [-5:5] (whereas
Xthe xrange default is [-10:10]).  This was a range suggested by Bill
XSchulz when I pinned him down on what would be "reasonable" one day.
XIf you can think of any reason for any other range please let me know.
XThe current range has the habit, by the way, of plotting over cyclic
Xfunctions defined on [0:2*pi] such that dashed lines don't look good.
XThere seems to be no real "solution" other than to avoid the default
Xrange where it doesn't make any sense.
X
XPlotting, as described in my additions to gnuplot.doc, in parametric
Xmode requires pairs of functions.  Consider the following:
X
Xplot [-3:3] [0:20] [-10:20] sin(t),t**2,'data.file',t,t**2
X
Xwhich has a trange of [-3:3] an xrange of [0:20] and a yrange of [-10:20].
XThe plot consists of 3 curves: sin(t),t**2; the 'data.file' points;
Xand the plot of t,t**2.  The last, of course, could be done in 
Xnon-parametric mode as simply x**2.  In parametric mode, you have to
Xbe finished defining a parametric pair (an x-function and a y-function)
Xbefore you can put in a `with' or `title' modifier.
X
XRanges can be set on the plot command or with the `set [xyt]range'
Xcommand.  As an added benefit, when in parametric mode, the xrange
Xcan be autoscaled.  This is true because, like the yrange, the xrange
Xis now a computed entity.
X
XFinally, I decided that the data file, as ordered (x,y) pairs, could affect 
Xthe xrange but not the trange.  Hence plotting the following:
X
Xplot sin(t),cos(t),'data.file'
X
XWhere 'data.file' only has points in the positive x range will cause
Xthe plot of sin(t),cos(t) to take on x values only in the positive
Xx range.  Another option was to make 'data.file' x values affect the
Xworking t range of the parametric function.  This did not seem like
Xa good idea, however, and some effort was made to avoid this affect.
XThe best plan might have been to ignore the 'data.file' ranges
Xall together when in parametric mode.  I hope someone will think
Xon this issues and voice an opinion at some point in the future.
X
X
XUNFINISHED ISSUES
X
XThere are some unfinished issues that I ran across in doing the parametric 
Ximplementation.  These are not so much parametric related issues as 
Xthey are general gnuplot issues that the parametric work brought to the 
Xforefront.
X
XFirst, what is the use of global xmin and xmax changes when a
Xdata file is plotted?  In other words, why would xmin and xmax
Xchange for the whole session when the data file was just mentioned
Xonce on a command line.  It seems that this global behavior is
Xunwarranted.  The routine in question, get_data() simply checks 
Xagainst the global xmin,xmax rather than the local x_min, x_max
Xthat eval_plots() will eventually pass on to do_plot().  The change
Xwouldn't be hard to do, and I'm hoping someone will decide it is
Xa good idea for a later bug patch.
X
XAlso, the default style for each individual plot depends upon the
Xline_type and point_type of the plot.  Gnuplot currently increments
Xthe line_type (and possibly point_type) for each plot that it is
Xplotting regardless of the type of plot in question.  For instance,
Xplot x,'data.file',x**2 will generate x with line_type of 1 and
Xx**2 with line_type of 3 while plot x,x**2,'data.file' will use a
Xline_type of 1 and 2 respectively.  This also seemed expedient, but
Xnot quite right in terms of what would be nicest behavior.  It seems
Xto me that line_type's are scarce resources and should be used 
X(incremented) only as needed.  In other words, since the 'data.file'
Xplot isn't using a line_type at all, the second line_type should be
Xsaved for the x**2 plot, and the two plots would look the same
Xinstead of being different as they are now.
X
XOf course, neither of these issues are critical.  We've been living with
Xthem comfortably for the whole life of at least the latest gnuplot 2.0
Xrelease.  It seems to me, however, that both these problems are minor
Xoversights and could easily be corrected in the near future.  Rather
Xthan do that here, as part of the parametric work, I decided that would
Xbe a change to the previous non-parametric behavior and should not be
X"snuck in" without a bit of debate.
X
XJohn Campbell   jdc@naucse.cse.nau.edu   or CAMPBELL@NAUVAX.bitnet
X
X
XSCO CGI DRIVERS 
X---------------
Xcopyright 1990 Ronald Florence
X
XThe 'cgi' driver added to Gnuplot 2.0 will work with the SCO CGI drivers.
XTo use the CGI drivers, you will need to have the CGIPATH and CGIDISP 
Xand/or CGIPRNT environmental variables declared.  The CGI output mode 
Xcan be controlled by setting an ASPECT environmental variable.  The 
Xdefault is to use full-screen/full-page.
X
XTwo CGI terminal options are provided.  If you have either CGIDISP or
XCGIPRNT declared, Gnuplot 2.0 will start with terminal set to "cgi".
XIf both devices are declared, you can "set terminal hcgi" to select
Xthe CGIPRNT (hardcopy) device instead of the default CGIDISP device.
XThis is useful when you are proofing a graph on the display before
Xsending output to a printer or plotter.
X
XThe driver has been tested with the SCO vga, ega, cga, hercules, and
Xlaserjet drivers.  If you are using a monochrome VGA display you may
Xneed to include "-DVGA_MONO" in your Makefile to work-around the
Xbroken SCO monochrome VGA display drivers.  The CGI driver includes 
Xa built-in pause-for-any-key feature which makes the Gnuplot
X"pause -1 prompt" command redundant.
X
XPermission is hereby granted for unlimited non-commercial use of this
Xcode, on condition that the copyright notices are left intact and any
Xmodifications to the source code are noted as such.  No warranty of
Xany kind is implied or granted for this material.
X
XPlease send suggestions and comments to ron@mlfarm.com.
X
X
XMODIFICATIONS IN PATCH 2.
X-------------------------
X
XTony McGrath <phs145p@vaxc.cc.monash.edu.au>
X  Fixed replot line length calculation (command.c).
X
XJohn Engel <jengels@bnandp51.bitnet>
X  vttek terminal driver (term/tek.trm).
X  vms additions for tektronix drivers (term.c).
X  hpljii driver - now uses the same bitmap routines as the epson driver
X   and will work on a PC (term/hpljii.trm).
X  
XRussell Lang <rjl@monu1.cc.monash.edu.au>
X  Created term.c function 'void reopen_binary()' for PC (term.c).
X  Removed HPLJET driver.
X  Added an error check for bad xrange when plotting functions -
X   this came up when an attempt is made to plot an non-existent
X   data file with x autorange, followed on the next command line
X   by an attempt to plot a function (command.c).
X  Added new bit mapped graphics (bitmap.h, bitmap.c, term.c,
X   epson.trm, hpljii.trm).
X  Removed PROPRINTER driver - use epson_lx800 instead.
X  nec_cp6 monochrome drivers also work with epson lq-800.
X
XRik Harris <edp367s@monu6.cc.monash.edu.au>
X  Fixed 'set dummy' command (command.c).  
X  Previously crashed if dummy variable missing.
X
XDave Kotz <dfk@cs.duke.edu>
X  added x11 autosense code (term.c).
X  empty gnuplot.doc lines now produce empty lines in .ms
X   or .tex files.  (doc2ms.c, doc2tex.c)
X  check for zero argument in call to x**(-n). (internal.c)
X
XJames Dugal <jpd@usl.edu>
X  Fixed messy octal constants (epson.trm).
X
XJeff Kellem <composer@chem.bu.edu>
X  Fixed ceil and floor to work as per documentation - for complex argument, 
X   return integer ceil/floor of real part (standard.c).
X  Changed gnuplot_x11.c to use default screen (gnuplot_x11.c).
X
XAnthony Thyssen <thyssen@batserver.cs.uq.oz.au>
X  (Ideas by Anthony, code by Russell Lang)
X  Changed 'plot with impulses' to draw impulses to origin (graphics.c).
X  Added 'plot "datafile" using y|xy|yx "scanf string"' (command.c).
X
XGreg Montgomery <greg@turbo.atl.ga.us>
X  Turbo C BGI drivers now use far code, to avoid segment _TEXT 
X   overflow with TC++ (makefile.tc, linkopt.tc, plot.c).
X
XSebastian Kremer <sk@thp.Uni-Koeln.DE>
X  Kyocera laser printer driver (term/kyo.trm).
X
XJohn Eaton <jwe@emx.utexas.edu>
X  set [no][xy]zeroaxis  (graphics.c, setshow.c, setshow.h).
X
XJohn Campbell <jdc@naucse.cse.nau.edu>
X  Parametric plots (command.c, misc.c, setshow.c, setshow.h).
X
XRonald Florence <ron@mlfarm.com>
X  SCO CGI driver (term.c, term/cgi.trm).
X
XChip Rosenthal <chip@chinacat.Unicom.COM>
X  Fixes a security problem with ".gnuplot" files (plot.c).
X  Add pipe option for output file on Unix.  Can now say
X  'set output "|more" '.
X
XEd Kubatis <ejk@uxh.cso.uiuc.edu>
X  Ignore interrupts in gnuplot_x11.c (gnuplot_x11.c).
X  Added X11 Motif support (gnuplot_x11.c).
X  Demo files for 'plot using'.
X  Added ifdef GETCWD for HP-UX (command.c).
X  Fixed RS/6000 AIX 3.1 build problem (misc.c).
X
XRonald Hartranft <RJH2@NS.CC.Lehigh.EDU>
X  Base work on new bit mapped graphics routines.
X
XAlex Woo <woo@pioneer.arc.nasa.gov>
X  Changed -DGAMMA to -DGAMMA=gamma so that -DGAMMA=lgamma
X  can be used on the NeXT (standard.c, makefiles).
X
XEnd of README2.patch
END_OF_README2.patch
if test 12252 -ne `wc -c <README2.patch`; then
    echo shar: \"README2.patch\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0

exit 0 # Just in case...
-- 
Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
Sterling Software, IMD           UUCP:     uunet!sparky!kent
Phone:    (402) 291-8300         FAX:      (402) 291-4362
Please send comp.sources.misc-related mail to kent@uunet.uu.net.