syntax constants options calculate load & save examples licensing

Plotter - the manual

Plotter is's empirical plotting utility, a tool to draw function graphs or calculate function value tables. Plotter can be used to produce images of up to three curves of mathematical functions and ten points of interest in a simple cartesian system.

Quick-n-dirty usage: enter one ore more functions (mathematical expressions) into the fields on the right and gently press the button labeled 'Draw' to see the corresponding curves in an image on the left side.

The functions f(x), g(x), h(x) to plot and some optional settings can be set in on the right hand side: a line color (in the ususal hex notation) can be selected, a legend inside the plot area can be switched on or off, the points calculated to draw the curve can be shown either as dots or interconnected and the inside or outside of each curve can be filled with the selected color.

There are some more options on the right hand side:

hull is the outer function in a function composition. The function values of the inner functions $f(x), g(x)$ and $h(x)$ will pointwise be used as variable values Y for the outer (or hull) function H(Y). In math notation that is $(H \circ f)(x), (H \circ g)(x)$ and $(H \circ g)(x)$.
This is similar to a substitution, e.g. sin(Y) defined as hull function will plot the sine of each defined function, $f(x)$ will be replaced by the composite function $H(f(x)) = \sin(h(x))$. Consider using 2*exp(-.5*Y) as hull function, x as f(x) and x^2 as g(x) - you will get this plot of 2*exp(-.5*x) and 2*exp(-.5*x^2).
Qis a simple substitution mechanism, an expression used as a substitute for the special variable Q in function terms. A function value will be calculated after calculation of Q, so f(x) = 2 - Q with Q = 1+x really means f(x) = 2 - (1+x).
df/dx (first derivative) shows the (numerical) derivative of the given function. In a legend, this first derivative of f(x) will be shown as f'(x)=[...]'.
∫f(x)dx (integral) shows the cumulative function in the drawn interval (integrate over ...). Calculated function values will be multiplied with the difference in variable values for each step, added together and a constant value - the integration constant C is added (if set). This numeric integral of the function $f$ will be called F(x)=S[...].


For all functions and numbers, plotter uses mathematical expressions containing function names, constant names and combinations of the following symbols:

x is treated as variable name in functions $f(x)$
0-9numbers like 123.45, input values are hardly restricted (as long as you don't plan to use more than some hundred digits). The output value (result) in a non-logarithmic scale is restricted to +/-9223372036854775807 which is also the maximum value for both axes.
Large or small numbers may be written in scientific Notation (the standard index form like 2.5E20 for $2.5\cdot 10^{20}$), with a a mantissa using up to 12 decimal places.
. ,you can use a point or a comma as decimal separator: 1.5 is the same as 1,5
+-*/the basic arithmetic operations
(as usual when multiplying numbers and variable names, the operator '*' can be omitted, i.e. 2x = 2*x)
( ) [ ] { } < >brackets, as in {[(1+x)/(2-x)+1]*3}/(2*x^2). As common in mathematics, any type of brackets can be used pairwise.
; is used as separator for functions accepting multiple input values, for example scir(x;2) will plot a semicircle with a radius of 2. For historical reasons (read: backward compatibility), # is allowed, too: scir(x#2) is identical to scir(x;2).
asyshow a vertical asymptote at a fixed value x, e.g. asy(1) or asy(e)

As a rule of thumb, every expression that can be evaluated by a PHP-interpreter can be calculated (so you can use the usual functions like sqrt(x) for the square root or sin(x) for a sine) - although there are many optimizations and additional functions defined.



Plotter is aware of some common constants that may be used in function terms, expressions and all numerical input. For example, e^x with Euler's constant $e$ means the same as exp(x) and a plot can easily be drawn in an interval from $-\pi$ to $\pi$ by setting the plotting range from -pi to pi.

The named constants known by plotter are

eEuler's number: 2.718281828459
pi / PI$\pi$, Pi: 3.1415926535898
pi2 / PI2$\pi$/2, Pi/2: 1.5707963267949
sq2$\sqrt{2}$, the square root of 2: 1.4142135623731
gorelation of the golden ratio: 1.6180339887499
dFeigenbaum constant $\delta$: 4.6692016091030
g_accthe gravitational acceleration on earth's surface, commonly approximated by $9,81 \frac{\text{m}}{\text{s}^2}$
hthe Planck constant (the quantum of electromagnetic action that relates a photon's energy to its frequency), defined as $h = 6.62607015\cdot 10^{−34} \text{J}\cdot\text{s}$
hbarthe Planck constant measured in radians $\hbar = 1.054571817\cdot 10^{−34} \text{J}\cdot\text{s}$
cthe speed of light in empty space, $c = 299792458 \frac{\text{m}}{\text{s}}$
NaAvogadro's constant (the number of particles in one mole of substance), $N_A = 6.02214076\cdot 10^{23} \text{mol}^{-1}$

predefined Functions

Plotter knows many interesting functions, nested ones like sin(pow(x;2/3)) all kinds of polynomials like 2*x^3-4*x^2+x+1 and rational functions will work out of the box. Many known functions expect multiple values or variables which should be separated by colons (; as in norm(2;1;x), hashes will work, too) - this way, a dot or a comma can both be used as decimal separator.


- basic functions

^ or pow power function, e.g. x^2 or pow(x;2) for $x^2$. A root can be written using a fraction as exponent, so x^(1/2) or x^.5 means the square root of $x$, an exponential function $e^x$ can be written as e^x or pow(e;x).
Caution: real (complex numbers cannot be plotted in cartesian coordinates) roots of negative values can only be calculated if the numerator is 1 and the denominator is odd (e.g. x^(1/3) ). To calculate negative x-values for an odd numerator and a denominator < 1, the expression can be transformed - it is common to read (x^(1/3))^2 as the result of x^(2/3).
sqrt the square root as a function (positive values), sqrt(x) is equivalent to $\sqrt{x} = x^{1/2};\quad x \gt 0$.
sqr alternative expression for the square root, the same as above.
exp exponential function, Euler-function, exp(x) is equivalent to e^x.
log natural logarithm (logarithm to base e) , log(x) = $\log_{e} x$.
ln natural logarithm, the same as above, ln(x) = log(x)
log10 decadic logarithm, log10(x) = $\log_{10} x$.
logn logarithm to base n, the first argument is the base, e.g. logn(2;x) as the binary (base 2) logarithm.

- trigonometric and hyperbolic functions

sin Sine, sinus, usage is sin(x)
cos Cosine, cosinus, usage is cos(x)
tan Tangent, usage is tan(x)
cot Cotangent, usage is cot(x)
sin2 Sine square, usage is sin2(x)
cos2 Cosine square, usage is cos2(x)
tan2 Tangent square, usage is tan2(x)
cot2 Cotangent square, usage is cot2(x)
arcsin Arcsine, usage is arcsin(x)
arccos Arccosine, usage is arccos(x)
arctan Arctangent, usage is arctan(x)
arccot Arccotangent, usage is arccot(x)
sinh Hyperbolic Sine, usage is sinh(x)
cosh Hyperbolic Cosine, usage is cosh(x)
tanh Hyperbolic Tangent, usage is tanh(x)
coth Hyperbolic Cotangent, usage is coth(x)
arsinh Area Hyperbolic Sine, usage is arsinh(x)
arcosh Area Hyperbolic Cosine, usage is arcosh(x)
artanh Area Hyperbolic Tangent, usage is artanh(x)
arcoth Area Hyperbolic Cotangent, usage is arcoth(x)
sec Secant, usage is sec(x)
cosec Cosecant, usage is cosec(x)
arcsec Arcsecant, usage is arcsec(x)
arccosec Arccosecant, usage is arccosec(x)
sech Hyperbolic Secant, usage is sech(x)
cosech Hyperbolic Cosecant, usage is cosech(x)
arsech Area Hyperbolic Secant, usage is arsech(x)
arcosech Area Hyperbolic Cosecant, usage is arcosech(x)

cat Catenary, cat(2;x) is the catenary function $2\cdot \cosh(x/2)$. The first value is used as the constant $a$ in $f = a\cdot \cosh(x/a)$.
gd Gudermannian function, gd(x) is defined as $\arctan(\sinh(x))$.
siv Semiversus, e.g. siv(x) for $\sin^2(x/2)$.
sinc Sine cardinalis, sinc(x) is $\dfrac{\sin(x)}{x}$.
tanc Tanc function or tangent cardinalis, tanc(x) is defined as $\dfrac{\tan(x)}{x}$.
hubb Hubbert curve, e.g. hubb(x) for $\dfrac{1}{2+2\cdot \cosh(x)}$.
L Langevin function, e.g. L(x) for $\coth(x)-\dfrac{1}{x}$.
deg converts a radian number into the equivalent in degrees. deg(pi) $= \pi\cdot \frac{180^\circ}{\pi} = 180 (^\circ)$.
rad converts a number in degrees into its radian equivalent. rad(180) = $180^\circ \cdot \frac{\pi}{180^\circ} = \pi$.

- non-differentiable functions

abs the absolute value of the variable, abs(x) = $|x| = \begin{cases} x; \; & x \geq 0 \\ (-1)\cdot x ; \; & x<0 \end{cases}$
min minimum of several values, e.g. min(1;x;x^(1/3)) is the minimum of $1, x$ and $\sqrt[3]{x}$.
max maximum of several values, max(abs(x);x*x) is the maximum of the absolute value of $x$ and $x^2$.
% modulo division, the whole-numbered remainder, e.g. 10%x
fmod modulo division, floating point remainder, so fmod(x;1) displays everything after the decimal point of the input value.
round or R round, the optional second argument sets the number of decimals. For example, R(x;2) rounds x to two decimal places, R(x) rounds to an integer.
floor or R0 floor (round down to an integer). For example, floor(x) is equivalent to Gauss brackets $[x]$ (the integer part of $x$).
ceil or R1 ceil (round up), ceil(x) is equivalent to $[x] + 1$.
dist distance function, dist(x) yields the distance to the nearest integer.
prime prime number function, prime(x) returns the next lower prime number (or $x$ itself, if prime) for $x\geq 2$ and $x \leq 100000$. In all prime functions, non-integers are rounded.
prime1 prime number detecting function, prime1(x) returns $x$ if $x$ is prime, 0 otherwise.
prime2 distinct prime factor counting function, prime2(x) returns the number of different prime factors for an integer.
prime3 prime factor counting function, prime3(x) returns the number of prime factors for an integer, including repetitions. So prime2(4) is 1 (the two prime factors are the same), whereas prime3(4) is 2. For a prime number, prime3(x) is 1
div divisor function, div(x) returns the number of divisors of an integer. Non-integers are rounded.
dig the digit sum, dig(x) returns the sum of all digits of an integer (in decimal representation). Non-integers will be rounded and negative values will be treated as positive.
dig2 iterated (one-digit) digit sum, e.g. dig2(x) returns the iterated digit sum of an integer.
adig alternating digit sum, e.g. adig(x). Non-integers are rounded, negative variable values are treated as positive.
fac factorial defined as $x! = \prod\limits_{k=1}^x k ;\; x \in \mathbb{N}$ and $0! := 1$. For negative numbers, a factorial does not make sense. Non-integers will be rounded.
HHeaviside step function, used to model switching. H(x) is defined as $0$ for $x < 0$, $1$ else.
Hmmultivariate Heaviside step function. Hm(arg1;arg2) is $0$ if at least one argument is $ < 0$, else $1$. Hm accepts any number of arguments.
sig signum function (sign function), sig(x) is $-1$ if $x < 0$, $1$ if $x > 0$ or $0$ if $x = 0$.
haarHaar wavelet, e.g. haar(x)
gcfgreatest common factor (or greatest common divisor, gcd), e.g. gcf(8;x) returns the greatest common factor between two integers. Non-integers will be rounded.
lcmleast common multiple, e.g. lcm(8;x) returns the least common multiple between two integers. Non-integers will be rounded.
moMöbius function $\mu(x)$. For a positive integer $x$, mo(x) returns 0 if $x$ has a squared prime factor, -1 if $x$ has an odd number of distinct prime factors and 1 if $x$ has an even number of distinct prime factors. The argument will be rounded to an integer and the maximum value is 100000.
totiEuler's totient function, e.g. toti(x) counts all positive integers less than $x$ that are comprime to $x$. Non-integers will be rounded.
oddfind odd numbers. odd(x) returns only odd numbers. Non-integers will be rounded.
evenfind even numbers. even(x) returns even numbers . Non-integers will be rounded.
binbinomial coefficient with two arguments $n$ and $k$ in \[ \binom{n}{k} = \frac{n!}{k!(n-k)!}\] For example, bin(4;x) yields $\binom{4}{x}$, non-integer values will be rounded.
triperiodic triangle curve, e.g. tri(1;2;x). The first value is the period, the second the amplitude.
rectperiodic rectangle curve, e.g. rect(1;-1;2;x). The first argument is the upper limit, the second the lower limit and the third is the period.
sawsawtooth wave function, e.g. saw(2;1;x). The first value is the period, the second the amplitude.
saw2reverse sawtooth wave, e.g. saw2(2;1;x). Arguments as above.
rampramp function, e.g. ramp(1;2;1;x) The first two arguments are the start and end value, the third one sets the final height.
ramp2reverse ramp function, e.g. ramp2(1;2;1;x) with arguments start value, end value and height.
traptrapezium (trapezoid) function, e.g. trap(-4;-1;3;2;3;x) The first value is the start value of the climb, the second is the end value of the climb, the third is the height, the fourth is the start value of the descent and the fifth is the end value of the descent.
polypolyline or chart line, each pair of arguments is read as a point and connected to the previous one with a line. poly(-4;2;-3;4;-2;1;-1;0;0;3;1;2;2;-1;3;3;4;1;x) plots a chart where (-4,2) is connected to (-3,4) which is connected to (-2,1) etc. The polyline must be connected from left to right (i.e. the $x$-values must increase with each step).
randinteger (pseudo-)random number between two limits, rand(0;2) returns 0, 1 or 2 (numbers are generated by PHP using a Mersenne twister).
rand2floating-point (pseudo-)random number between two limits. The third argument allows to adjust the precision (number of decimals, maximum is 9). For example, rand2(0;1;3) returns a number between $0$ and $1$ with three decimal places.

- probability functions and statistics

normnormal or Gaussian distribution $f(x) = \frac {1}{\sqrt {2\pi \sigma ^{2}}}e^{-{\frac{(x-\mu )^{2}}{2\sigma^{2}}}}$, the first value is the mean $\mu$, the second is the standard deviation $\sigma$. See norm(2;1;x) for a standard normal distribution shifted two units to the right.
phi$\Phi$, cumulative Gaussian distribution function with arguments mean $\mu$ and standard deviation $\sigma$ as above. This is an approximation based on the interval displayed. It could be used if the normal distribution starts at values close to 0. See phi(0;1;x) for a reasonable example.
chi2chi-square distribution, e.g. chi2(3;x) The first value is the number of the degrees of freedom.
ichi2inverse-chi-square distribution, e.g. ichi2(3;x) The first value is the number of the degrees of freedom.
sichi2scale-inverse-chi-square distribution, e.g. sichi2(3;1;x) The first value is the number of the degrees of freedom, the second is the scale parameter, both must be >0.
chichi distribution, e.g. chi(3;x) The first value is the number of the degrees of freedom.
stud Student's t-distribution (also known as t-distribution), e.g. stud(2;x) The first value is the number of the degrees of freedom.
F F-distribution (Fisher-Snedecor), e.g. F(5;2;x) The first two values are the numbers of the degrees of freedom.
Fz Fisher's z-distribution, e.g. Fz(5;2;x) The first two values are the numbers of the degrees of freedom.
lnorm log-normal distribution, e.g. lnorm(0;1;x) The first value is the mean, the second is the standard deviation.
cau Cauchy distribution or Lorentz distribution, e.g. cau(0;1;x) for the standard Cauchy distribution. The first value is the location parameter, the second is the scale parameter.
lapc Laplace distribution, e.g. lapc(0;1;x) The first value is the location parameter, the second is the scale parameter. The second parameter must be >0.
logd logistic distribution, e.g. logd(1;2;x) The first value is the location parameter, the second is the scale parameter.
hlogd half-logistic distribution, e.g. hlogd(x)
rlng Erlang distribution, e.g. rlng(5;1;x) The first value is the shape parameter, the second is the rate parameter. The first parameter must be a natural number.
pon exponential distribution, e.g. pon(1;x). The first parameter is the rate parameter $\lambda$ in \[ f(x;\lambda) = \begin{cases}\lambda e^{-\lambda x} & x \ge 0, \\0 & x < 0.\end{cases}\]
cosd raised cosine distribution, e.g. cosd(0;1;x) The first value is the location parameter, the second is the scale parameter. cosd is defined in the interval [location-scale;location+scale].
sechd hyperbolic secant distribution, e.g. sechd(x)
kum Kumaraswamy distribution, e.g. kum(2;3;x) The first two values are the shape parameters a and b.
levy Lévy distribution, e.g. levy(1;x) The first value is the scale parameter.
rlgh Rayleigh distribution, e.g. rlgh(1;x) The first value is the scale parameter.
wb Weibull distribution, e.g. wb(2;1;x) The first value is the shape parameter, the second is the scale parameter.
wig Wigner semicircle distribution, e.g. wig(1;x) The first value gives the radius.
gammad gamma distribution, e.g. gammad(2;3;x) The first value is the shape parameter, the second is the scale parameter.
igammad inverse-gamma distribution, e.g. igammad(2;1;x) The first value is the shape parameter, the second is the scale parameter.
igauss inverse Gaussian distribution, e.g. igauss(1;0.25;x) The first value is the shape parameter, the second is the scale parameter.
betad beta distribution, e.g. betad(2;3;x) The first two values are the shape parameters, these must be ≥0. betad is defined for x in [0;1].
betap beta prime distribution, e.g. betap(2;3;x) The first two values are the shape parameters, these must be >0.
par Pareto distribution, e.g. par(2;1;x) The first value is the location parameter, the second is the shape parameter.
pear Pearson distribution (type III), e.g. pear(1;1;2;x) The first value is the location parameter, the second is the scale parameter and the third is the shape parameter.
nak Nakagami distribution, e.g. nak(4;1;x) The first value is the shape parameter, the second is the spread parameter.
shg shifted Gompertz distribution, e.g. shg(0.5;1;x) The first value is the scale parameter, the second is the shape parameter, both must be >0.
brw relativistic Breit-Wigner distribution, e.g. brw(1;2;x) The first value is the mass of the resonance, the second is the resonance's width and the third is the energy.
gen generalized extreme value distribution, e.g. gen(0;1;0.2;x) The first value is the location parameter, the second is the scale parameter and the third is the shape parameter.
Ft Fisher-Tippett distribution, e.g. Ft(1;2;x) The first value is the location parameter, the second is the scale parameter. The second parameter must be >0.
rossi Rossi distribution, or mixed extreme value distribution, e.g. rossi(0;3;1;4;x) The first four values are c1, c2, d1 and d2.
gum1 Gumbel distribution type 1, e.g. gum1(2;1;x) The first two values are the parameters a and b.
gum2 Gumbel distribution type 2, e.g. gum2(2;1;x) The first two values are the parameters a and b.
trid triangular distribution, e.g. trid(1;2;4;x) The first value is the lower limit, the second is the most probable and the third is the upper limit.

- discrete distributions

bind Binomial distribution, e.g. bind(5;0.4;x) The first value is the number of trials, the second is the success probability.
nbin Negative binomial distribution, e.g. nbin(3;0.4;x) The first value is a paremater >0, the second is a probability.
poi Poisson distribution, e.g. poi(3;x) The first value is λ, the second is the expected value.
skel Skellam distribution, e.g. skel(1;2;x) The first two values are the means of two different Poisson distributions.
gk Gauss-Kuzmin distribution, e.g. gk(x)
geo Geometric distribution (variant A), e.g. geo(0.8;x) The first value is a probability.
hgeo Hypergeometric distribution, e.g. hgeo(8;3;2;x) The first value is the total number of objects, the second is the total number of defective objects, the third is is the number of sample objects and the fourth the number of defective objects in the sample.
yule Yule-Simon distribution, e.g. yule(2;x) The first value is the shape parameter.
logs Logarithmic series distribution, e.g. logs(0.1;x) The first value is a probability.
zipf Zipf or zeta distribution, e.g. zipf(3;x) The first value is a parameter >0.
zm Zipf-Mandelbrot law or Pareto-Zipf law, e.g. zm(100;1;2;x) The first three values are N, q and s. Maximum for N is 100.
uni Uniform distribution, e.g. uni(1;2;x) The first value is the lower limit, the second is the upper limit.

- special functions

traj Trajectory parabola, path of a thrown object, e.g. traj(45;20;9.81;x) The first value is the angle in degrees, the second one the speed $v$ (e.g. in meters per second). The third value is the gravitational acceleration $g$ (e.g. in m/s²), the average value on earth is $g$ = 9.81 m/s².
pll Parallel operator, the reciprocal value of the sum of all reciprocal arguments. For example, pll(20;30;x) is equivalent to \[ f(x) = \frac{1}{\frac{1}{20} + \frac{1}{30} + \frac{1}{x}} \] Accepts any number of arguments.
M1 Arithmetic mean \[ \bar{x} = \frac{1}{n}\sum_{k=1}^n x_k. \] Accepts an arbitrary number of arguments $x_k$. For example, M1(2;3;x) will return the mean of $x_1=2$, $x_2=3$ and the current value $x$, i.e. $\frac{1}{3}(2+3+x)$
M2 Geometric mean \[ \bar{x}_g = \left(\prod_{i=1}^{n}x_{i}\right)^{\frac {1}{n}} ={\sqrt[{n}]{x_{1}x_{2}\cdots x_{n}}}, \] M2(2;3;x) is equvalent to $\sqrt[3]{2\cdot 3\cdot x}$. Accepts any number of arguments, only positive values are allowed.
M3 Harmonic mean \[ \bar{x}_\text{harm} = \frac{n}{\frac{1}{x_{1}}+\dotsb +\frac{1}{x_{n}}}, \] accepts any number of arguments $n$, only positive values are allowed.
M4 Root mean square \[ \mathrm {RMS} = \sqrt{{\frac {1}{n}}\sum_{i=1}^{n}{x_{i}^{2}}} = \sqrt{\frac {x_{1}^{2}+x_{2}^{2}+\cdots +x_{n}^{2}}{n}} \] M4(2;3;x) Accepts any number of arguments.
M5 Median, the value separating the higher half from the lower half in an ordered set of values (or the mean of the two values in the center if the number of members is even). For example, M5(2;3;x) is 3 for $x =$ 4 and 2 for $x =$ 1. Accepts any number of arguments.
scir Semicircle curve, for example scir(x;1) for a semicircle with radius 1. The curve is calculated as $y = \sqrt{r^2-x^2};\quad y\leq 0$.
ell Semielliptic curve, e.g. ell(2;1;x) for a semiellipse with a horizontal radius of 2 and vertical radius 1. Calculated as $y = \sqrt{b^2(1-\dfrac{x^2}{a^2})}; \quad y\leq 0$.
ell2 Semi-superellipse or semi-hyperellipse, \[ \left|{\frac {x}{a}}\right|^{n}\!+\left|{\frac {y}{b}}\right|^{n}=1; \quad y\leq 0.\] arguments are ell2(a;b;n;x), so ell2(2;3;4;x) will draw a semiellipse with horizontal radius 2, vertical radius 3 and $n$=4.
lmn Lemniscate of Bernoulli, constructed as $\left(x^{2}+y^{2}\right)^{2}-2a^{2}\left(x^{2}-y^{2}\right)\,=\,0$ with parameter $a$. lmn(1;x) returns the upper half of the lemniscate with $a = 1$. For the lower half, you can use -lmn(1;x)
lmn2 Lemniscate of Gerono, $x^{4}-x^{2}+y^{2}=0$. lmn2(x) returns the upper half of the lemniscate.
lmn3 Lemniscate of Booth, $(x^{2}+y^{2})^{2}=cx^{2}+dy^{2};\; c>0>d$ with parameters $c, d$. For $c=1$ and $d=-1$, the upper half of the lemniscate is calculated by lmn3(1;-1;x).
pyth Pythagorean theorem, returns the root of the squared arguments. pyth(x;1) $= \sqrt{x^2 + 1^2}$.
thr Rule of three, thr(x;1;2) is $f(x)=1\cdot \frac{2}{x}$.
fibFibonacci numbers, e.g. fib(x) or fib(x;1). The numbers are calculated as natural ones unless the second parameter is set to 1 - in this case, a continuous value will be calculated (the un-rounded value of the approximation of the Fibonacci numbers).
dc Exponential decay $f(x) = f_0\cdot e^{-\lambda\cdot x}$, the first argument is the start value $f_0$, the second the decay constant $\lambda$, so dc(5;1;x) = $1\cdot e^{-5 x}$.
erf Gaussian error function, erf(x) $ ={\frac {2}{\sqrt {\pi }}}\int _{0}^{x}e^{-\tau ^{2}}\,\mathrm {d} \tau$. The function is approximated using a Taylor series.
HY4 Hyper4, also known as tetration or super-exponentiation and usually written as $^na$, iterated exponentiation af a value ${\displaystyle {a^{a^{\cdot ^{\cdot ^{a}}}}}}$. The second parameter defines the number of iterations, hence HY4(x;1) is $x$ and HY4(x;3) means $x^{x^x}$. Caution - function values can grow rapidly!
lambda Lambda function $x^{x^{n-1}}$ with parameter $n$, so lambda(x;3) is x to the power of (x to the power of (3-1)).
sgm Sigmoid function or logistic function, sgm(x) $= \dfrac{1}{1+e^{-x}}$.
gom(a;b;c;x) Gompertz curve $y = ae^{-be^{-cx}}$, e.g. gom(2;-5;-3;x). The first value is the upper asymptote, the second is the parameter b and the third is the growth rate. Second and third value must be negative.
zeta Riemann zeta function for values >1, e.g. zeta(x). Approximated by the finite series \[ \zeta (x) = \sum _{n=1}^{1000 }n^{-x} \approx \sum _{n=1}^{\infty }n^{-x};\; \Re(x)>1\,.\]
eta Dirichlet eta function, e.g. eta(x). Calculated using the approximation of the Riemann zeta function $\eta (s)=(1-2^{{1-s}})\cdot \zeta (s)$.
stir Stirling's asymptotic approximation for large factorials, stir(x) = $ \sqrt{2\pi\cdot x}\left(\frac{x}{e}\right)^x \approx x!$.
gamma Gamma function (Euler and Weierstrass definition, an approximation), e.g. gamma(x) as extension of the factorial function and for many statistical distributions.
beta Euler beta function, e.g. beta(2;x). The function is calculated using the (approximated) gamma function: \[ \mathrm{B} (x,y) = \frac{\Gamma(x)\cdot \Gamma(y)}{\Gamma (x+y)}\]
digamma Digamma function, digamma(x) is the logarithmic derivative of the gamma function \[ \psi (x)=\frac{d}{dx}\ln\big(\Gamma(x)\big)=\frac{\Gamma^\prime(x)}{\Gamma(x)} \]
omega Lambert-W function or Omega function or product log (approximation), e.g. omega(x)
theta Ramanujan theta function, e.g. theta(x;0.3) The two values are a and b. abs(a*b) must be <1.
bump Bump function $\Psi$, e.g. bump(x) for $\exp(-1/(1-x^2))$ between -1 and 1, else 0.
srp Serpentine curve, calculated as $\dfrac{abx}{x^2 + a^2}$. The first two values are the constants $a$ and $b$, srp(2;1;x) $ = \dfrac{2\cdot 1\cdot x}{x^2 + 2^2}$.
bsc Gaussian bell-shaped curve, $\exp(-(ax)^2)$. The first value is the shape parameter $a$, so bsc(1;x) is the curve of $f(x) = e^{(-x)^2}$.
gbsc Generalized Gaussian bell-shaped curve $a\cdot e^{b\cdot x + c\cdot x^2}$ with arguments $a$, $b$ and $c$, for example gbsc(1;2;-1;x) for $f(x) = 1\cdot e^{2\cdot x-1\cdot x^2}$.

- logic functions

bool Characteristic boolean function, e.g. bool(1/x) Returns nothing if the input value is not defined, 0 if 0, else 1.
bool0 Defined boolean function, e.g. bool0(x) Returns 0, if the input value is 0 or not defined, else 1.
bool1 Undefined boolean function, e.g. bool1(prime1(x)) Returns nothing, if the input value is 0 or not defined, else 1.
con Condition function, e.g. con(l;x;u) will return 1 if $x \in [l, u]$, 0 else. The first and third argument are the lower and upper limit of the interval. See con(0;sin(x);1) for an example.
rcon Reverse condition function, the logical negation of the function above. rcon(0;sin(x);1) con(l;x;u) will return 1 if $x \not\in [l, u]$, 0 else.
wcon Weighted condition function, e.g. wcon(0;sin(x);1) Only returns the second value, if this lies between the first and the third value.
rwcon Reverse weighted condition function, e.g. rwcon(0;sin(x);1) Only returns the second value, if it's not located between the first and the third value.
&& (and) can be simulated with the minimum function, e.g. min{ con[0;sin(x);1] ; con[0;cos(x);1] }
|| (or) can be simulated with the maximum function, e.g. max{ con[0;sin(x);1] ; con[0;cos(x);1] }
⊕ (xor) can be simulated with the maximum minus the minimum function, e.g.
max{ con[0;sin(x);1] ; con[0;cos(x);1] } - min{ con[0;sin(x);1] ; con[0;cos(x);1] }

- iterations (iterative functions)

Caution: derivative and integral combined with iteration will not lead to reasonable results. Logarithmic scale won't work either.

y Previous function value, e.g. for y(0)+0.01 is 0 the initial value for y, the next value is the last result of the input value x and so on.
y2 Pre-previous function value, e.g. y2(1)+0.001
step Number of the iteration steps done, divided by the parameter value, e.g. step(100) counts up to five (at 500 px width).
mean Iterated arithmetic mean, e.g. mean(sin(x)) gives the arithmetic mean of function values calculated from the leftmost up to the current value in x.
man Mandelbrot function, e.g. man(0;-1.9) for $y(0)\cdot y(0)-1.9$.

- fractals

rsfRandom singular function (a kind of devil's staircase), e.g. rsf(0;2) for y(a)+0.008*rand(0;1)*rand(0;1)*(b-a), from a (first value) to b (second value) at 500px width. The first value is the start point on the y-axis, the second is the average end value.
wf Weierstrass function, approximated using \[ f(x) := \sum_{k=0}^n a^k\cos(b^k\pi x) \] The second parameter is $a; \; 0 1+\frac{3}{2} \pi$. e.g. wf(x;0.5;17;10) The second value is a parameter between 0 and 1, the third value is an odd and positive integer. The second multiplied with the third must be larger than $1+3/2\pi$. The fourth value is the number of steps done. In theory this is infinite, but here the maximum is 100.
blanc Blancmange curve, approximated as \[ \operatorname{blanc}(x) = \sum_{k=0}^n \frac{s(2^{k}x)}{2^k}\] with the triangle wave $s(x)=\min _{n\in {\mathbf {Z} }}|x-n|$ on the unit interval $[0;1]$ and its periodic continuation. The second value is the number of steps done ($n-1$), maximum is 1000. An example is blanc(x;10).
tak Takagi-Landsberg curve, approximated as \[ T_w(x) = \sum_{k=0}^n w^k s(2^{k}x)\] with the triangle wave $s(x)=\min _{n\in {\mathbf {Z} }}|x-n|$ on the unit interval $[0;1]$ and its periodic continuation. The second value is the parameter $w;\; 0 \leq w \leq 1$, the third one sets the number of steps done ($n-1$, the maximum is 1000). See tak(x;0.7;10) for an example.

differential and integral equations

Derivatives of a function within a function can be calculated if declared as:
D or D1 First derivative, e.g. D(x*x)
D2 Second derivative, e.g. D2(x^3)
D3 Third derivative, e.g. D3(x^4)
  D0 or D01 First derivative, alternative form, e.g. D0(x*x)
D02 Second derivative, alternative form, e.g. D02(x^3)
D03 Third derivative, alternative form, e.g. D03(x^4)
Only one derivative of each form can be used in one function. So something like D(...)+D2(...) or D(...)+D0(...) will work, but D(...)+D(...) or D(...)+D1(...) will not.
The derivative of fourth order over a function can be generated by using D3(...) and selecting derivative display option in the plot or by a combination like D(D3(...)) (not D(D(...))). The maximum for reasonable results is an order of seven, eg D(D3(D03(...))).

Integrals within a function can be expressed as:
S or S1 first integral, e.g. S(x*x)
S2 second integral, e.g. S2(x)
S3 third integral, e.g. S3(1)
Only one integral can be included in one function. So something like S(...)+S2(...) will not work.
An integral of fourth order over a function can be generated by using S3(...) with an integral Display option.


adjusting plot appearance

display options:

The appearance of the curves created can be changed by a set of options in a dialog. If desired (and if the GD library supports the underlying filters), the resulting image can be transformed with GD's image filters (the list of filters depends onthe GD version used).
image type:plotter knows three quite common image formats: png (compression level 1), gif (GIF87a) and jpeg (with 90 percent quality level). In gif and png format the background can be set to be transparent, the jpeg image format does not support transparency.
width / height set the size of the image in pixels. For practical reasons, the minimum size is 200, maximum is 500.
range defines an interval the curves are displayed in. Maximal input and output value is +/-100000. Using a logarithmic scale, the output value can raise up to about 10300. Constants like pi are allowed in interval borders.
intervals number of sectors on each axis labeled with dashes and numbers. Maximum is 250 or half of the width / height.
grid lines the number of the grid lines drawn. Maximum is half of the width or height.
dashes length length of the dashes on both axes. Maximum length is 500.
decimal places defines the number of decimal places displayed. This also sets the number of decimal places used in calculation of values for the function tables. The default value is 3, maximum is 12.
gap at origin sets the size of an optional symbolic gap around the origin in px. You guessed that already - if set to 0, no gap is shown.
graph thickness line thickness of function graphs in px. Values can be positive integers up to 200 (which looks quite funny...).
log. scale select linear or logarithmic scale on one or both axes. If no logarithm is selected, an axis will be drawn using a linear scale. You can choose logarithmic bases 2, e, 10 or 100 or enter an individual value. Caution: logarithmic display will not work in combination with integrals, derivates or iterations.
quadrantsoffers buttons to change the displayed quadrants and an input field for their size. If you wish to change the size, do so before clicking one of these buttons.
The checkboxes can be used to switch grid and axes lines (for x- and y-axis), captions (values and axes), dashes, frame and error messages (if any).

Below, some display colors and antialiasing (which often looks better) can be chosen. poles, if selected, tries to find and take care of poles in a function (unfortunately, this feature is far from being perfect).
Lines and captions can be drawn in back- or foreground or switched off.
rotation sets an angle (in degrees) by which the image will be rotated.
emboss, blur, negative, greyscale, sketchy and edges only are effects changing the look of the graph as their name implies (see GD image filters).


calculate function values

plotter can be used to calculate function values if given a list of (discrete) variable values. To calculate, a function term (given in plotter's syntax) and a list of variable values is needed. There are three buttons to copy the function definitions in the plotting part (named f(x), g(x) and h(x)).

Variable values used to calculate distinct points on the curve can be given in text form (a line of numbers separated by spaces), the buttons +10/-10 will enter whole numbers from 1 to 10 rsp -1 to -10.

Once calculated, the values will be displayed in a format selected by the radio buttons - a line of numbers, a table, in csv-notation (comma-separated) or as a snippet of LaTex code.


load & save

Each time a plot is created, the selected values and options are concatenated into a (long and ugly!) query string to pass all relevant data to the graphing part and produce just the actual image. Using this mechanism, the plot can be redrawn at any time by simply passing the same data to graph.php (which in turn will happily return an image in the selected format). All required information is stored in the query string - so the URL displayed in the text field can be used to create a predefined plot on the fly, there's no need to save the image into a file. Of course, the URL can be saved as text to create a plot later on.

Direct linking to a function plot is a nice feature, but the URL with plotter's options in the query string is really ugly. That's why a short link (tinyurl-a-like) is created in the upper field. The short link can be used if you do not need a direct link to the image (in other words: if a redirection is acceptable).

By appending " .qr " to the end of the short link, a QRCode (in png format) of the short link will be created which in turn will redirect to the image of the created plot - simple, huh?

Here's an example: the short URL (the QR-code is   ) links to a simple plot of a standard parabola.



All images created by the plotter located at are covered by a WTFPL-License or in other words, they are released into public domain. Please do not use the plotter if you don't feel comfortable with this.

This plotter instance is running at oettinger-physics, please see my impressum and privacy page for further information.