A tutorial on explicit/parametric
and
everything you did not dare to ask
about
curves and surfaces
in
gnuplot
Several types of curves and surface are supported in gnuplot. Of those
not every operation is supported for every curve or surface type and it
can be therefore useful to understand the different types, their advantages
and limitations.
Curves in gnuplot are almost always planar (with one exception which we
will deal with in the end) and are assumed to be in the XY plane.
Therefore only X and Y coordinates are needed for plotting curves.
The simplest curve is the `explicit function`. This curve is in fact a
function and for each given x, there is one and only one y value associated
with it. A gnuplot example for such type is `plot sin(x)` or
`plot "datafile" using 1". Note the later is using only a single column from
the data file which is assumed to be the y values.
Alternatively one can define a `parametric curve` form. In this case
x and y are both functions of a third free parameter t, while independent
of each other. A circle can be expressed parametrically as x = cos(t),
y = sin(t) and be plotted using gnuplot as
'set parametric; plot cos(t),sin(t)'.
This form is not a function since there can be unlimited number of y values
associated with same x. Furthermore the explicit form is a special case of
the parametric representation by letting x equal to t. The curve y = sin(x)
can be written in parametric form as y = sin(t), x = t.
We are used to think of the plane in cartesian coordinate system.
In practice, some coordinate systems may be easier to use then others
under some circumstances. The polar form uses a different basis
to span the XY plane. In this representation the cartesian x coordinate
is equal to r cos(t) and the cartesian y coordinate is equal to r sin(t).
To draw a unit circle using the polar coordinate system in gnuplot use the
following simple command: 'set polar; plot 1'. To better understand this
explicit form lets backup a little.
When we plot a regular explicit function like `y = sin(x)` we march in equal
steps in x, evaluate the provided function and plot a piecewise linear curve
between the sampled points approximating the real function. In the polar
explicit form we do exactly the same thing, but we march along the angular
direction - we turn around the origin, computing the length of the radius
at that angle. Since for the unit circle, this radius is a constant 1,
`plot 1` in polar form plots a circle (if t domain is from 0 or 2Pi).
Note the polar form is explicit in that for each angle there is only a
single radius.
Surprisingly (or maybe not so surprising) surfaces share the same
representations. Since surfaces are two dimensional entities, they
require two free parameters (like t for curves).
A surface explicit function uses x and y as the free parameters. For
each such pair it provides a single z value. An example for this form
can be `splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2)` for a three dimensional
sinc function or `splot 'datafile' using 1`. As for curves, the single column
used from the data file defines the function value or z in this case.
The order of the x and y function values is very strict in this form and
simply defines a rectangular grid in the XY plane. Fortunately this
strict form allows us to apply a very simplistic hidden line algorithm
called "the floating horizon". This hidden line algorithm exploits the
rectangular XY domain of the surface and therefore may be used for this
type of surfaces only. Since in gnuplot this is the only form of hidden
lines removing algorithm provided, only explicit surfaces may have their
hidden lines removed.
Parametric surfaces are the exact extension for explicit surfaces as in
the curves case. the x, y, and z are defined in terms of two new free
variables and are totally independent of each other as x(u, v), y(u, v),
and z(u, v). Again the explicit surface is a special case of the parametric
representation where x = u, and y = v. Examples for plotting parametric
surfaces in gnuplot can be `splot cos(u)*cos(v),cos(u)*sin(v),sin(u)` which
defines a sphere, or `splot "datafile" using 1:2:3`. Since these are
parametric surfaces, gnuplot must be informed to handle them by issuing
`set parametric`.
The curve polar form takes the obvious extensions in the surface world.
The first possible extension is spherical coordinate system, while the
second is the cylindrical one. These modes currently work for data files
only and both requires two parameters, theta and phi for mapping onto the
unit sphere, and theta and z form mapping on a unit radius cylinder as follow:
Spherical coord. Cylin. coord.
---------------- -------------
x = cos( theta ) * cos( phi ) x = cos( theta )
y = sin( theta ) * cos( phi ) y = sin( theta )
z = sin( phi ) z = z
This subject brings us back to non planar curves. When surfaces are displayed
under gnuplot, isocurves are actually getting plotted. An isocurve is a
curve on the surface in which one of the two free parameters of the
surface is fixed. For example the u isolines of a surface are drawn by
setting u to be fixed and varying v along the entire v domain. The v isolines
are similarly drawn by fixing v. When data files are specified they are
classified internally into two types. A surface is tagged to have grid
topology if all its specified isolines are of the same length. A data mesh
of five isolines, seven points each is an example. In such a case the
surface cross isolines are drawn as well. Seven isolines with five points
each will be automatically created and drawn for grid type data. If
however, isolines of different length are found in the data, it is
tagged as nongrid surface and in fact is nothing more than a collection
of three dimensional curves. Only the provided data is plotted in that
case (see world.dem for such an example).
This is the official release of GNUPLOT.3.2. It is available in either
a patch or tar archive. Sites for the retrieval are listed in the
README. Below are the modifications and contributors to this release.
The patch file 3_1to3_2.patch needs to be applied with the p1 flag
>cd gnuplot
>patch -p1 < 3_1to3_2.patch
Thanks --- Alex Woo
* Subject: New generic gnuplot_x11.c
Name: Ed Kubaitis
Email: ejk@ux2.ncsa.uiuc.edu
* Subject: Hidden Line Removal for Explicit Surfaces and IRIX 4.0 fixes.
Name: Gershon Elber
Email: gershon@gr.utah.edu
* Subject: Table Terminal Driver.
Name: Kevin Russo
Email: russo@rudedog.nrl.navy.mil
* Subject: PCL5 driver fixes (HPGL page eject),datafile pipe and README.
Name: Alex Woo
Email: woo@ames.arc.nasa.gov
* Subject: Pbmplus driver and fix to y log tics.
Name: Russell Lang
Email: rjl@monu1.cc.monash.edu.au
* Subject: NeXT Console Driver.
Name: Nick Strobel
Email: strobel@phast.phys.washington.edu
* Subject: Fix GNUTERM environment with disk resident BGI drivers
Name: Craig Johnston
Email: johnston@maxwell.ee.washington.edu
* Subject: Fix tables for troff in doc2ms
Name: Michael Schuh
Email: schuh@ames.arc.nasa.gov
* Subject: Fix dump when GNUPLOT$HELP undefined
Name: Wolfgang J. Moeller
Email: moeller@gwdgv1.dnet.gwdg.de
* Subject: Fix AMIGA segment limits
Name: Carsten Steger
Email: stegerc@informatik.tu-muenchen.de
* Subject: Put FAR pointers in bitmap.c and bitmap.h
Name: Russell Lang
Email: rjl@monu1.cc.monash.edu.au
* Subject: Bug fix to latex.trm
Name: Rob Cunningham
Email: rkc@xn.ll.mit.edu
----------------------------------------------------------------------------
GNUPLOT 3.1 Patch
This package provides the upgrade of gnuplot 3.0 to patch level 1.
Below are the contributers to this upgrade and the modifications made.
Thank you all
Gershon
----------------------------------------------------------------------------
* Subject: Y log / postscript eps fix
Name: Russell Lang
Email: rjl@monu1.cc.monash.edu.au
* Subject: HP26 driver to lift text.
Name: Bruce Lueckenhoff
Email: luechen@cis.udel.edu
* Subject: CRAY prt, UIUC coordinates.
Name: Daniel S. Lewart
Email: d-lewart@uiuc.edu
* Subject: AI device
Name: Ray Ghanbari
Email: ray@mtl.mit.edu
* Subject: HP_MOTIF on a Snake, X11 for Next
Name: Alex Woo
Email: woo@ra-next.arc.nasa.gov
* Subject: Mod. to LaTeX for multiple curves/plots, complex atan function fix.
Name: Ray Toy???
Email: toy@soho.crd.ge.com
* Subject: Fix the "splot 'file.dat'" with only z values.
Name: Gershon Elber
Email: gershon@gr.utah.edu
* Subject: Underscore prefixed names.
Name: Tom Tkacik
Email: tkacik@hobbes.cs.gmr.com
* Subject: Amiga port
Name: Carsten Steger
Email: stegerc@informatik.tu-muenchen.de
Version 3.3 was never officially released. It has been renamed to version 3.4 to avoid confusion with the numerous BETA versions which have made it into general circulation. See README.3p4 for more information.
This is version 3.4 of Gnuplot, anonymous ftpable from
sun.soe.clarkson.edu:~ftp/submit/gnuplot3_4.tar.Z
This is an official release.
Below is a list of all patches included. If you think other bug fixes/changes
should be included please drop me a message. These patches were tested under
the following:
1. SGI 4D (IRIX 4.0.5).
2. DEC 5000 (Ultrix).
3. IBM PC (bcc 3.1, MSDOS 5.0).
4. NeXTCube (OS 2.1)
5. CRAY Y-MP 8/128 (UNICOS 6.4)
6. VAX (VMS 5.4 without X11)
7. DEC OSF (with X11)
8. SUN Sparc 2 (OS 4.1.1)
Please try them on your favorite platform. If you contributed a patch to the
list below, please double check it was appropriately applied.
Alex Woo
----------------------------------------------------------------------------
This version of gnuplot represents the work of many people. For a more
complete list read the RCS log on the top of makefile.unx. This version
originally was centered on Jos Van Woude's probability functions,
Don Tabor's discrete contour levels and Rob Cunningham's binary file
IO capability. It has grown tremendously. Russell Lang and Maurice
Castro added MS-Windows capability and much more. Roger Fearick
added OS/2 capabilility. Alexander Lehmann and Hans-Edgar Koechling
greatly improved Atari support. (There are also an OS-9 and PC-9801 versions
of 3.2 and a Mac version of 3.0 and a multiple plot on a page mod
which were not integrated into this release.) Eric Youngdale replaced the
explicit function hidden line removal routines with a more general
implicit bitmap (which requires more memory). Gershon Elber fixed
many 3D bugs and added the "dgrid3d" option which takes allows
scattered data to be contoured. Ed Kubaitis reworked the X11 support.
In addition, many more devices are now provided. We have
always added device drivers because we have no way to debug most of
them and only by including them into the package we obtain feedback.
In addition, we have begun a contrib subdirectory which contains
external library, programs, and mods which help in the use of
Gnuplot. Many of the diffs are now out of date and will take
some work to implement.
These contributions are not in any particular order.
* Subject: Special Functions for Probability Densities
Name: Jos van der Woude
Email: jvdwoude@hut.nl
* Subject: Discrete Contour Levels
Name: Don Taber
Email: news@solitary.stanford.edu,dbt@victoria.risc.rockwell.com
* Subject: LN03p (Graphic Enhance Mode) Driver and REGIS fixes
Name: Hung-chi Lihn
Email: lihn@ssrl01.slac.stanford.edu
* Subject: LESS-like additions to READLINE capability
Name: Michal Tomczak, Tom Tkacik
Email: ntomczak@vm.ucs.ualberta.ca,tkacik@hobbes.cs.gmr.com
* Subject: doc2texinfo : Converts Gnuplot .doc files to Texinfo format.
Name: George Ferguson
Email: ferguson@cs.rochester.edu
* Subject: Atari ST (gcc 1.40) version and PureC version
Name: Alexander Lehmann, Hans-Edgar Koechling
Email: alexlehm@iti.informatik.th-darmstadt.de,
koechling@nvdv.e-technik.uni-stuttgart.dpe.de
* Subject: ISO 8869/1 character sets
Name: Marius Olafsson
Email: marius@rhi.hi.is
* Subject: HP PaintJet Driver
Name: Dan Merget
Email: danm@hpnmdlc0.sr.hp.com
* Subject: Improvements to HP PCL driver
Name: Timothy Collins, Tom Swiler, Alex Woo
Email: kaph6@solx1.central.susx.ac.uk,tom@silica.mse.ufl.edu
* Subject: plot "file" thru f(x) for transforming datafiles
Name: Jack Veenstra
Email: veenstra@cs.rochester.edu
* Subject: improvement to HPGL driver
Name: Craig Johnston
Email: johnston@maxwell.ee.washington.edu
* Subject: X11 mods
Name: Ed Kubaitis, Yehavi Bourvine
Email: ejk@ux2.ncsa.uiuc.edu, YEHAVI@vms.huji.ac.il
* Subject: Binary File IO
Name: Rob Cunningham, Jos van der Woude
Email: rkc@xn.ll.mit.edu,jvdwoude@hut.nl
* Subject: Improved Hidden Line Removal & LITE flag
Name: Eric Youngdale
Email: eric@tantalus.nrl.navy.mil
* Subject: xlib driver & test programs in contrib
Name: Gregg Hanna
Email: gregor@kafka.saic.com
* Subject: MS-Windows, boxes and boxerror styles, plot using accepts
columns in any order, plus many, many improvements
Name: Russell Lang, Maurice Castro
Email: rjl@monu1.cc.monash.edu.au, maurice@bruce.cs.monash.edu.au
* Subject: OS/2 version
Name: Roger Fearick
Email: fearick@physci.uct.ac.za
* Subject: scatter to grid mods "set dgrid3d", plus fixes
Name: Gershon Elber scatter to grid mods
Email: gershon@cs.utah.edu
* Subject: Notitle option to remove entry in key
Name: R. Shouman
Email: rshouman@hermes.chpc.utexas.edu
* Subject: Misc. Bug Fixes, new get_data, many improvements
Name: Daniel S. Lewart
Email: d-lewart@uiuc.edu
* Subject: H Olav Eggestad RGIP Uniplex driver (POSIX) and Imagen driver
Name: Hans Olav Eggestad
Email: olav@jordforsk.nlh.no
* Subject: New plotstyle "steps" for discrete functions
Name: John Grosh
Email: jgrosh@brl.mil
* Subject: CorelDraw! driver (subset of EPS)
Name: Chris Parks
Email: parks@physics.purdue.edu
* Subject: PSTRICKS driver (for TeX)
Name: Ray Toy
Email: toy@soho.crd.ge.com
* Subject: Framemaker MIF 3.0 driver
Name: Olof Franksson
Email: olof@ikaros.fysik4.kth.se
* Subject: Apollo mods
Name: Jim Richardson
Email: jimr@maths.su.oz.au
* Subject: TGIF driver
Name: Neal Holtz
Email: nholtz@civeng.carleton.ca
* Subject: TPIC specials driver (TeX)
Name: Honoo Suzuki
Email: honoo@nc.titech.ac.jp
* Subject: Log to any base capability
Name: Lawrence Crowl
Email: crowl@cs.orst.edu
* Subject: Talaris EXCL driver
Name: P. Klosowski
Email: przemek@rrdstrad.nist.gov
* Subject: New LaTeX Driver
Name: Xiaoguang Zhang
Email: zhang@whbws.ms.ornl.gov
* Subject: TeXdraw driver (eepic derivative)
Name: Khun Yee Fung
Email: clipper@csd.uwo.ca
* Subject: debug and hp2623a driver, fixes
Name: Bruce Lueckenoff
Email: luecken@udel.edu
SOME NOTES ON GNUPLOT ON THE AMIGA ...
Environment Variables:
GNUFONT You can say "setenv GNUFONT <Fontname>/<Pointsize>" to get the
font of your liking on the screen, e.g.:
"setenv GNUFONT sapphire/14".
Otherwise gnuplot will select the default-font you chose with
"Preferences".
GNUHELP Allows you to define a pathname for the gnuplot help file. For
example, "setenv GNUHELP TEX:gnuplot.gih"
GNUPLOT Your current directory is searched for the file ".gnuplot".
If you say "setenv GNUPLOT <Path>" (without the filename!)
gnuplot will look for it there.
GNUTERM You can define a default driver with "setenv GNUTERM <driver>".
A good choice is "setenv GNUTERM amiga" :^)
SHELL If you don't like "NewShell" as your shell, you can say
"setenv SHELL <Shell>".
Stack Size:
A stack size of at least 25000 bytes should be used while running gnuplot.
If you use recursive functions, e.g. like in "bivariat.dem", you will have
to increase your stack size accordingly. Otherwise gnuplot will exit with
a run time error.
-------------------------- SAS/C 6.1 VERSION -----------------------------
Default paths/directories:
Gnuplot looks for the file "gnuplot.gih" in your "S:"-directory unless you
specify the full pathname including the filename via "setenv GNUHELP".
--------------------------- AZTEC C VERSION ------------------------------
Default paths/directories:
Gnuplot looks for the "gnuplot.gih" file in "GNUPLOT:docs/gnuplot.gih" if
GNUHELP is not defined. This is defined in the makefile (makefile.ami).
Terminal Drivers:
The Aztec C version can now use the "amiga.trm" driver written by
Carsten Steger. Under KS/WB 2.0, a custom screen will be used with a size
specified by the Prefs/Overscan program.
(Carsten's note: The Aztec version of gnuplot has not received any support
since the release of version 3.2. I think version 3.3 will neither compile
nor work. I don't have Aztec C, so I can't do anything about it...)
A note to former Gnutex users, from David Kotz (David.Kotz@Dartmouth.edu). -------------------------------------------------------------------------- May 30, 1991 GNUTeX was merged with GNUPLOT beginning with GNUPLOT 2.0. Many aspects of gnutex 1.6 made it into GNUPLOT 2.0. Unfortunately for those of us who have a lot of gnutex input files around, not everything from gnutex is supported by GNUPLOT. To help gnutex users with the process of adapting to GNUPLOT (and I recommend it), I have included a section in the LaTeX/GNUPLOT tutorial (in ./docs/latextut/) about the differences, and written a translator program. Please read the LaTeX/GNUPLOT tutorial. The translator was available as part of the GNUPLOT 2.0 release, but has been removed from the standard distribution of GNUPLOT. The translator is now available for anonymous ftp from cs.duke.edu as dist/sources/gnuplot/gnut2p.tar.Z. It has not changed since GNUPLOT 2.01 (ie, GNUPLOT 2.0 patchlevel 1). Users of gnutex that did not use the LaTeX driver will probably have little difficulty adapting. Please send all comments, complaints, and suggestions on this subject to David.Kotz@Dartmouth.edu.
MetaFont Terminal Driver for GnuPlot (MF.TRM):
----------------------------------------------
The new terminal driver creates a input file to the MetaFont program.
Thus a figure may be used in the TeX document in the same way as a
character is.
To use the plot in a document the MetaFont program must be run
with the output file from GnuPlot as input. Thus, the user needs a basic
knowledge of the font creating prosess and inclusion of a new font in a
document. However, if the Metafont program are set up properly at the
local site an unexperienced user could perform the operation without
much trouble.
The text support is based on a MetaFont character set.
Currently the Computer Modern Roman font set is input but the
user are in principal free to chose whatever fonts he/she needs.
The MetaFont source files for the chosen font must be available.
Each character is stored in a separate picture variable in MetaFont. These
variables may be manipulated (rotated, scaled etc.) when characters are
needed. The drawback is the interpretation time in the MetaFont
program. On some machines (i.e. PC) the limited amount of memory available
may also cause problem if too many pictures are stored.
The MetaFont terminal driver MF.TRM is UENCODED and included in this mail.
Also the "diff" files between an orginal TERM.C and mine are
UENCODED included. I am afraid there may be several
differences which are not due to the MetaFont terminal. However, the new
terminal driver should be included in exactly the same manner as the other.
In TERM.H the only necessary change is :
#define MF
Please inform me if something goes wrong. I will then transfer the code
to an anonymous FTP cite where you can pick it up.
To use the MetaFont terminal driver:
------------------------------------
1) In GnuPlot use: set terminal mf
set output "myfile.mf"
.
.
.
plot ....
exit
2) Run MetaFont. Syntax is site dependant:
On my UNIX I use: cmmf '\mode=localfont; \mag=1;' input myfile.mf
On my PC I use: mf286 &cm \mode=localfont; \mag=1; input myfile.mf
Be aware that MetaFont can only handle number less than 4096. Thus if you
have very high resolution in your localfont and a large picture you will
probably get an error message when running metaFont. To solve the
problem,
reduce the resolution or the plot size.
3) Run GfToPk, syntax is
on my UNIX: gftpk myfile.xxxgf myfile.pk
on my PC: gftpk myfile.xxx myfile.pk
where xxx is the resolution (typically 300).
The version of GfToPk included with unix TeX3.14 probably needs to be
compiled with more memory than it is. Third line in GFTOPK.C declares
a variable "maxrow". Defining this to 32000 should be sufficient.
4) Copy the files myfile.pk and myfile.tfm to a place where you are sure TeX
and the dvi processing programs you use can find them. (They can
probably
be located in your current working directory)
5) Include in your TeX document the following statement:
\font\myfont=myfile % Declares the new font you just have made
{\myfont\char0} % Typeset character with code zero which
% MF.TRM uses as default character
HPGL to GnuPlot converter (HPG2GNU):
-------------------------------------
I have also written a program which interprets files written in
Hewlett Packard's plotter language, HPGL, and outputs the graphic
on an available GnuPlot terminal.
Personally, I have used the program as an link to the MetaFont terminal
(the orginal version of the program only translated from HPGL to MF).
This way I am able to design pictures in my favorite graphic drawing
program,
export the figures to HPGL files and translate to MetaFont. A lot of new
symbols (fancy arrows, electronic components, process symbols etc. etc.)
can thus be made available to TeX as new font sets without the need to dig
into the MetaFont manual.
However, the program is now mainly based on code from the GnuPlot
program and according to the copyright notes should not be distributed.
With regard
Paal Hedne
SINTEF Multiphase Laboratory
N-7034 Trondheim
Norway
Tel.: -47-7-591060
E.mail: Pal.Hedne@termo.unit.no
This directory contains version 2 of the additional files
you'll need to get gnuplot3.0 to display it's postscript directly to a
window instead of going through the klunky process of writing the
postscript to a file and launching Previewer to view the file. Note
that all input is still done at the shell level! Fancier NeXTStep
interfaces will be a future project.
This version is faster and leaner than the old method. It
also does not eat up swap space like the older version (this was
particularly noticeable when doing animation-like plots). To do this
I used DPS function calls instead of creating a NXImage and
compositing the stream of commands. I based my code on the program
called "epsview" in the hackkit tar file on the archive servers.
The next.trm (next terminal) is basically the post.trm
(postscript terminal) with the fprintf replaced by DPSPrintf and
outfile by the DPSContext d. You'll also see that I also used some
code (with modifications) from David S. Joerg's MovieApp. Using the
DPS functions enabled me to slim down the EpsViewer.[hm] and
EPSView.[hm] files.
No claim is made to code elegance or to it being a good example of
objective-c coding. This is my first (well, second, sort of) objective-c
program. It seems to work for me. Any constructive criticism would be
appreciated. I can be reached at strobel@phast.phys.washington.edu
cheers!
nick strobel
GNUPLOT 3.3 for OS/2 v 2.0 ========================== 1) Introduction =============== This file discusses the version of GNUPLOT 3.3 implemented for OS/2 2.0. The command line interface of GNUPLOT is retained, while graphics output is plotted in a Presentation Manager Window. The GNUPLOT command line appears in another text-mode window on the screen. The PM window has facilities for printing the plot on the default printer, for changing the fonts used on the plot, and for switching between different ways of plotting the lines (with colour, as dot/dashed lines, or both). The command line window offers the usual GNUPLOT interface. Both Unix-style and DOS-style editing keys are supported. The GNUPLOT program was compiled with the emx version of the GNU compiler. It supports the shell command (type 'exit' to return to GNUPLOT), can pipe datafiles through external commands using '<', and supports command-line substitution. It runs the full set of demonstration programs supplied in the GNUPLOT source code distribution without problems. The GNUPLOT 3.3 port to OS/2 differs slightly from the 3.2 port, in that the PM driver is started from GNUPLOT, rather than the other way round. This means that the program name will have to be changed in the program object that runs GNUPLOT, if you install 3.3 over 3.2. This change does however make the GNUPLOT command line accessible to programs that pipe commands to GNUPLOT. 2) Running GNUPLOT ================== GNUPLOT can be run from the command line of an OS/2 session (preferrably a windowed command session, so that the command line and the displayed graph can be viewed at the same time), or can be set up as a program object in the WPS. GNUPLOT starts up as a command line session which accepts the usual GNUPLOT input. The Presentation Manager window for graphics display is only opened when the first 'plot' or 'splot' command is entered. If GNUPLOT is set up as a program object, it can be configured for 'drag and drop' in the usual way, by specifying '%*' as the program parameter. The PM window has facilities for printing the plot, for changing the fonts used in the plot, and so on. These of course are handled through the usual PM interface. In addition, you can 'drop' a font onto the window to change the font. The usual GNUPLOT commands can also be used to produce output on supported devices. Settings and the positions and sizes of the windows can be saved in the file gnushell.ini. This file is saved in the program's working directory; several different directories can be set up (as program objects) with different options, if you wish. GNUPLOT can be run with the PM display window maximised: clicking on the 'GNUPLOT' menu item (or pressing 'ESC') will bring the GNUPLOT window to the foreground; it will disappear again when plotting begins. GNUPLOT itself communicates with the PM display window (which is a separate program) through a named pipe. Plotting commands are sent to the PM window which produces the plot when all commands have been received. 3) The port of GNUPLOT to OS/2 ============================== Changes to the code have been kept minimal. Besides the obvious addition of the PM driver code, the following are the major changes: 1) Addition of code in readline.c to map keypad keys to editing functions, to duplicate the MS-DOS mode of editing the command line. (See GNUPLOT manual, page 2.) The rest of the changes are associated with defining the use of the OS2 conditional value, and setting system-dependent stuff like names, signal handling, and end-of-line handling (LF vs CR+LF). See the file patches.os2 for changes to the GNUPLOT source. 4) gnupmdrv.exe =============== Gnupmdrv.exe is the 'outboard' driver for GNUPLOT. It is a multithreaded PM program. Roger Fearick fearick@physci.uct.ac.za 5 November 1992
The modifications to gnuplot 3.2 in this directory add the capability of plotting probability distributions. This mod adds the following extra standard gnuplot functions: ibeta - incomplete beta function igamma - incomplete gamma function lgamma - natural log of gamma gamma - gamma function erf - error function (= trivial variation of infamous bell curve) erfc - 1.0 - error function (more accurate than 1.0 - erf yourself) rand - pseudo random number generator (in compliance with Knuth) using these things as building blocks, a gnuplot command file 'stat.inc' is provided with definitions of almost all statistical distributions. Author: Jos van der Woude, jvdwoude@hut.nl ========================================================== Directions to install gnuplot 3.3: (diffs are relative to gnuplot 3.0, patchlevel 2.0) If you have a BSD machine, add the following to the makefile.unx: OPTIONS = -DERF -DGAMMA and specfun.c to the SOURCES and specfun.o to the OBJECTS. For MSDOS machines (and non-BSD machines) do the following: ASSUMPTIONS: The diffs provided work for msdos based pc's, using turbo C, version 2.0, and Borland C++, version 2.0 or 3.0. If you use a different setup, you might have to make (some) changes. GOAL: To extend the standard function library of gnuplot 3.2 with the following functions: ibeta - incomplete beta function igamma - incomplete gamma function erf() - error function (= trivial variation of normal distribution function) erfc() - 1.0 - erf() (more accurate than computing 1.0 - erf() yourself) gamma() - gamma function (for entire domain!) lgamma() - natural logarithm of gamma function rand() - a statistical acceptable version of standard C rand() function These additions to the repertoire of standard functions turn gnuplot into an excellent tool for plotting statistical density and distribution functions. DETAILED INSTRUCTIONS: 0. Split the bottom part of this file into the appropriate files: readme.p3, patch3.dif, stat.inc, nomo95.dem, random.dem, prob.dem, prob2.dem, and specfun.c using an editor or a PD PC shar utility. 1. Use the patch program to generate new versions of: gnuplot.doc, command.c, internal.c, misc.c, parse.c, plot.c, plot.h, standard.c, util.c and version.c 2. Make sure that file specfun.c is in the gnuplot directory. 3. Use the make program to create new version of gnuplot. 4. Test the new functions with commmand files prob.dem, prob2.dem, random.dem and nomo95.dem. KNOWN BUG: On MSDOS machines this modification can result in a DGROUP segment overflow error at link time. The reason is that gnuplot uses the resources of the large memory model right up to the limit. There are two things you can do about this: 1. Compile gnuplot using the huge memory model. This was tested using Borland C++, version 2.0: Works fine, even with -DREADLINE enabled. 2. If you dont want to compile under the huge memory model you can try to disable unused terminal drivers in term.h. See instructions at top of file term.h. Happy plotting, Jos van der Woude Amsterdam, The Netherlands jvdwoude@hut.nl
README file for MS Windows version of gnuplot.
28th January 1993
Windows gnuplot requires 4 files to run:
WGNUPLOT.EXE Main program
WGNUPLOT.DLL Graphics and Text window library
WGNUPLOT.HLP Windows Help file
WGNUPLOT.MNU Menu file
These 4 files must be in the same directory.
More information is available from gnuplot 'help set terminal windows'.
WGNUPLOT runs in standard and enhanced modes.
Windows 3.1 is preferred, but it will run under Windows 3.0
with the following restrictions:
1. COMMDLG.DLL and SHELL.DLL (available with Windows 3.1 or Borland C++ 3.1)
must be in the windows directory.
2. WGNUPLOT.HLP produced by Borland C++ 3.1 is in Windows 3.1 format.
You need to use the WINHELP.EXE supplied with Borland C++ 3.1.
3. WGNUPLOT won't run in real mode due to lack of memory.
4. Truetype fonts are not available in the graph window.
5. Drag-drop does not work.
The Borland makefile is makefile.win.
Windows gnuplot has only been tested with Borland C++ 3.1.
Before making wgnuplot you will need to edit the TC = line
to specify the location of your compiler.
The Microsoft C 7.0 makefile is makefile.msw.
This version has had very little testing and currently crashes
if you set samples >= 2048.
X11 changes for gnuplot 3.3
---------------------------
Enhancements
------------
o VMS X11 support (Jehavi Bourvine)
o New X11 rendering for 'points' plotting style improves point
quality and eliminates the 'X11' terminal type whose only
function was to request multi-colored points. (Russell Lang)
o tailorable linewidths, dash styles, and point sizes (see
the man page)
o Color handling:
- "colorname,intensity" where 0 < intensity < 1
For example, 'blue,.5' means a half intensity blue
- hexadecimal RGB colors accepted (needed for HP VUE)
- Failure to parse/allocate a color defaults to black
for that color rather than monochrome for whole plot
o 'set term x11' assumed if '-display' option on command line.
Bug Fixes
---------
o On monochrome servers, any lines plotted before the first label
was printed were lost. This lost zero axes and garbled some
other plots. (Kenneth H. Carpenter)
o User specified geometry position ignored with some window managers.
Negative positions miscalculated. (Mike Coleman)
Vendor Botch Circumventions
---------------------------
o New X11FLAGS options:
- OW_BOTCH circumvents "ld.so: Undefined symbol: __XtInherit"
loader errors on Sun Open Windows platforms. (Vivek Khera)
- ISC22 circumvents select() problem with ISC2.2 (Robert Eckardt)
- BSD_TYPES pulls select FD_SET definitions from <sys/bsdtypes.h>
(Michael Herrmann)
- ULTRIX_KLUDGE expanded to circumvent missing demo plots at
Ultrix 4.1 (chan@holo.iitsg.nrc.ca)
o Random window geometry with Esix X11R3 (Al Bolduc)
Miscellaneous
-------------
o The man page has been updated to document that background and
foreground are not honored for monochrome displays, only -rv
and 'gnuplot*reverseVideo:on'.
o '-tvtwm' command line option and gnuplot*tvtwm resource
Mike Coleman's fix for user-specified geometry position for
other window managers causes tvtwm to use absolute rather
then virtual-relative coordinates when the user specifies
geometry. This command line option and resource tells
gnuplot_x11 to use PPosition (virtual-relative) when a
geometry position is requested.
Unfortunately, negative y positions are off by the size of the
window manager title bar. Thus, for example, -0-20 rather than
-0-0 is needed to place the lower right corner of the window
at the lower right corner of the screen.
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.