Download gnuplot manual

Transcript
7
constants. For example, {3,2} represents 3 + 2i; {0,1} represents ’i’ itself. The curly braces are explicitly
required here.
Note that gnuplot uses both "real" and "integer" arithmetic, like FORTRAN and C. Integers are entered
as "1", "-10", etc; reals as "1.0", "-10.0", "1e1", 3.5e-1, etc. The most important difference between
the two forms is in division: division of integers truncates: 5/2 = 2; division of reals does not: 5.0/2.0 =
2.5. In mixed expressions, integers are "promoted" to reals before evaluation: 5/2e0 = 2.5. The result
of division of a negative integer by a positive one may vary among compilers. Try a test like "print -5/2"
to determine if your system chooses -2 or -3 as the answer.
The integer expression "1/0" may be used to generate an "undefined" flag, which causes a point to
ignored; the ternary operator gives an example.
The real and imaginary parts of complex expressions are always real, whatever the form in which they
are entered: in {3,2} the "3" and "2" are reals, not integers.
10.1
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.
For those functions that accept or return angles that may be given in either degrees or radians (sin(x),
cos(x), tan(x), asin(x), acos(x), atan(x), atan2(x) and arg(z)), the unit may be selected by set angles,
which defaults to radians.