home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource5
/
334_01
/
gnuplot.doc
< prev
next >
Wrap
Text File
|
1991-02-06
|
60KB
|
1,643 lines
1 gnuplot
?
GNUPLOT is a command-driven interactive function plotting program. It
is case sensitive (commands and function names written in lowercase
are not the same as those written in CAPS). All command names may be
abbreviated, as long as the abbreviation is not ambiguous. Any number
of commands may appear on a line, separated by semicolons (;).
Any command-line arguments are assumed to be names of files containing
gnuplot commands, with the exception of standard X11 arguments, which
are processed first. Each file is loaded with the `load` command, in the
order specified. Gnuplot exits after the last file is processed.
Commands may extend over several input lines, by ending each line but
the last with a backslash (\). The backslash must be the LAST
character on each line. The effect is as if the backslash and newline
were not there. That is, no white space is implied, nor is a comment
terminated. Therefore, commenting out a continued line comments out
the entire command (see `comment`).
In this documentation, curly braces ({}) denote optional arguments to
many commands.
For help on any topic, type 'help' followed by the name of the topic.
2 cd
?cd
The `cd` command changes working directory.
Syntax:
cd <directory-name>
The directory name must be enclosed in quotes.
Examples:
cd 'subdir'
cd ".."
2 clear
?clear
The `clear` command erases the current screen or output device as
specified by `set output`. This usually generates a formfeed on
hardcopy devices. Use `set terminal` to set the device type.
2 comment
?comments
Comments are supported as follows: a # may appear in most places in a line
and GNUPLOT will ignore the rest of the line. It will not have this
effect inside quotes, inside numbers (including complex numbers), inside
command substitutions, etc. In short, it works anywhere it makes sense
to work.
2 environment
?environment
A number of shell environment variables are understood by GNUPLOT.
None of these are required, but may be useful.
If GNUTERM is defined, it is used as the name of the terminal type to
be used. This overrides any terminal type sensed by GNUPLOT on start
up, but is itself overridden by the .gnuplot (or equivalent) start-up
file (see help start-up), and of course by later explicit changes.
On Unix and MS-DOS, GNUHELP may be defined to be the pathname of the
HELP file (gnuplot.gih).
On VMS, the symbol GNUPLOT$HELP should be defined as the name of
the help library for gnuplot.
On Unix, HOME is used as the name of a directory to search for
a .gnuplot file if none is found in the current directory.
On MS-DOS, GNUPLOT is used. On VMS, SYS$LOGIN: is used.
See help start-up.
On Unix, PAGER is used as an output filter for help messages. SHELL
is used for the `shell` command.
On MS-DOS, COMSPEC is used for the `shell` command.
2 exit
?exit
?quit
The commands `exit` and `quit` and your computer's END-OF-FILE character
will exit GNUPLOT. All these commands will clear the output device
(as the `clear` command does) before exiting.
2 expressions
?expressions
In general, any mathematical expression accepted by C, FORTRAN,
Pascal, or BASIC is valid. The precedence of these operators is
determined by the specifications of the C programming language.
White space (spaces and tabs) is ignored inside expressions.
Complex constants may be expressed as the {<real>,<imag>}, where <real>
and <imag> must be numerical constants. For example {3,2}
represents 3 + 2i; {0,1} represents `i` itself. The curly braces
are explicitly required here.
3 functions
?expressions functions
?functions
The functions in GNUPLOT are the same as the corresponding functions
in the UNIX math library, except that all functions accept integer,
real, and complex arguments, unless otherwise noted. The `sgn`
function is also supported, as in BASIC.
@start table
#Function & Arguments & Returns \\ \hline
%Function@Arguments@Returns
%_
4 abs
?expressions functions abs
?functions abs
?abs
#abs(x) & any & absolute value of {\tt x}, $|x|$; same type \\
#abs(x) & complex & length of {\tt x}, $\sqrt{{\mbox{real}(x)^{2} +
#\mbox{imag}(x)^{2}}}$ \\
%abs(x)@any@absolute value of x, $|x|$; same type
%abs(x)@complex@length of x, $sqrt{real (x) sup 2 + imag (x) sup 2}$
The `abs` function returns the absolute value of its argument. The
returned value is of the same type as the argument.
For complex arguments, abs(x) is defined as the length of x in the
complex plane [i.e., sqrt(real(x)**2 + imag(x)**2) ].
4 acos
?expressions functions acos
?functions acos
?acos
#acos(x) & any & $\cos^{-1} x$ (inverse cosine) in radians \\
%acos(x)@any@$cos sup -1 x$ (inverse cosine) in radians
The `acos` function returns the arc cosine (inverse cosine) of its
argument. `acos` returns its argument in radians.
4 arg
?expressions functions arg
?functions arg
?arg
#arg(x) & complex & the phase of $x$ in radians\\
%arg(x)@complex@the phase of $x$ in radians
The `arg` function returns the phase of a complex number, in radians.
4 asin
?expressions functions asin
?functions asin
?asin
#asin(x) & any & $\sin^{-1} x$ (inverse sin) in radians \\
%asin(x)@any@$sin sup -1 x$ (inverse sin) in radians
The `asin` function returns the arc sin (inverse sin) of its argument.
`asin` returns its argument in radians.
4 atan
?expressions functions atan
?functions atan
?atan
#atan(x) & any & $\tan^{-1} x$ (inverse tangent) in radians \\
%atan(x)@any@$tan sup -1 x$ (inverse tangent) in radians
The `atan` function returns the arc tangent (inverse tangent) of its
argument. `atan` returns its argument in radians.
4 besj0
?expressions functions besj0
?functions besj0
?besj0
#besj0(x) & radians & $j_{0}$ Bessel function of $x$ \\
%besj0(x)@radians@$j sub 0$ Bessel function of $x$
The `besj0` function returns the j0th Bessel function of its argument.
`besj0` expects its argument to be in radians.
4 besj1
?expressions functions besj1
?functions besj1
?besj1
#besj1(x) & radians & $j_{1}$ Bessel function of $x$ \\
%besj1(x)@radians@$j sub 1$ Bessel function of $x$
The `besj1` function returns the j1st Bessel function of its argument.
`besj1` expects its argument to be in radians.
4 besy0
?expressions functions besy0
?functions besy0
?besy0
#besy0(x) & radians & $y_{0}$ Bessel function of $x$ \\
%besy0(x)@radians@$y sub 0$ Bessel function of $x$
The `besy0` function returns the y0th Bessel function of its argument.
`besy0` expects its argument to be in radians.
4 besy1
?expressions functions besy1
?functions besy1
?besy1
#besy1(x) & radians & $y_{1}$ Bessel function of $x$ \\
%besy1(x)@radians@$y sub 1$ Bessel function of $x$
The `besy1` function returns the y1st Bessel function of its argument.
`besy1` expects its argument to be in radians.
4 ceil
?expressions functions ceil
?functions ceil
?ceil
#ceil(x) & any & $\lceil x \rceil$, smallest integer not less than $x$
#(real part) \\
%ceil(x)@any@$left ceiling x right ceiling$, smallest integer not less than $x$ (real part)
The `ceil` function returns the smallest integer that is not less than its
argument. For complex numbers, `ceil` returns the smallest integer
not less than the real part of its argument.
4 cos
?expressions functions cos
?functions cos
?cos
#cos(x) & radians & $\cos x$, cosine of $x$ \\
%cos(x)@radians@$cos~x,$ cosine of $x$
The `cos` function returns the cosine of its argument. `cos` expects its
argument to be in radians.
4 cosh
?expressions functions cosh
?functions cosh
?cosh
#cosh(x) & radians & $\cosh x$, hyperbolic cosine of $x$ \\
%cosh(x)@radians@$cosh~x,$ hyperbolic cosine of $x$
The `cosh` function returns the hyperbolic cosine of its argument.
`cosh` expects its argument to be in radians.
4 exp
?expressions functions exp
?functions exp
?exp
#exp(x) & any & $e^{x}$, exponential function of $x$ \\
%exp(x)@any@$e sup x$, exponential functio