This is a short User's Guide for NetPlot. NetPlot is a web interface to
Gnuplot written JavaScript
and PHP. For detailed information
on particular commands please consult the Gnuplot on-line
documentation.
In the navigation bar
you can choose one of the five types of functions:
functions of one variable y=f(x)
parametric functions of one variable x=f(t), y=g(t)
functions in polar coordinates r=f(t)
functions of two variables z=f(x,y)
parametric functions of two variables x=f(u,v), y=g(u,v),
z=h(u,v)
Choosing the type of the function opens the respective input form.
Input Form
In the first row you enter the ranges of the variables.
The ranges are given from-to, for example:
x
: .
In the second row the function is entered. It is possible to enter
more functions separated by commas (see Examples below).
For 2D plots (functions of one variable, parametric functions of one
variable and functions in polar coordinates) in the third row
you can choose default axes, square axes or equal axes, and choose whether to
display rectangular grid or not. You can also zoom in or out.
For 3D plots (functions of two variables and parametric functions of two
variables) in the third row
you can choose whether or not to show hidden surfaces, the number of
mesh lines (10, 20, 30 or 40) and whether to dispay contour plot and
rectangular grid in the x-y plane. By clicking the red arrows you can
rotate the plot.
Constants, Operators and Functions
Two predifined constants are
pi=3.14159265358979 and e=2.71828182845905.
Operators +,-,* and / have the standard meaning.
Power operation, a "to" b, is described by a^b or by
a**b (the latter is the Gnuplot default).
a! stands for 'a factoriels'.
Brief description of some functions is given in the following table:
Function
Argument
Description
abs(x)
complex
absolute value of x, |x|
acos(x)
real
inverse cosine (cos-1x) in radians
asin(x)
real
inverse sine (sin-1x) in radians
atan(x)
real
inverse tangent (tan-1x) in radians
besj0(x)
radians
J0 Bessel function of x
besj1(x)
radians
J1 Bessel function of x
besy0(x)
radians
Y0 Bessel function of x
besy1(x)
radians
Y1 Bessel function of x
ceil(x)
real
least whole number larger than x
cos(x)
radians
cosine of x
cosh(x)
radians
hyperbolic cosine of x
erf(x)
complex
error function
erfc(x)
complex
1-erf(x)
exp(x)
real
ex, exponential function of x
floor(x)
real
largest whole number less than x
gamma(x)
complex
gamma function of real(x)
ibeta(p,q,x)
complex
incomplete beta function of real(p,q,x)
igamma(a,x)
complex
incomplete gamma function of real(a,x)
imag(x)
complex
imaginary part of x
int(x)
real
integer part of x truncated towards 0
inverf(x)
complex
inverse error function of real(x)
invnorm(x)
complex
inverse normal distribution of the real part of x
lgamma
complex
natural log of the gamma function of real(x)
log(x)
real
logex, natural logarithm (base e) of x
log10(x)
real
log10x, logarithm (base 10) of x
norm(x)
complex
normal (Gauss) distribution of real(x)
rand(x)
complex
pseudo-random number generator with seed=real(x)
real(x)
complex
real part of x
sgn(x)
real
1 if x>0, -1 if x<0, 0 if x=0
sin(x)
radians
sine of x
sinh(x)
real
hyperbolic sine of x
sqrt(x)
real
square root of x
tan(x)
radians
tangent of x
tanh(x)
real
hyperbolic tangent of x
Examples
Sine function y=f(x):
Sine function and semi-circle y=f(x):
Parametrical circle x=f(t),y=g(t):
The circle does not look round, unless you choose "Equal Axes".
Parametrical circle and ellipse x=f(t),y=g(t): ,
Archimedes' spiral and circle in polar coordinates r=f(t):
Hyperbolic paraboloid and the plane z=f(x,y):
Parametric sphere x=f(u,v),...:
Parametric spiral x=f(u,v),...:
Various styles and colors
For example,
y=f(x):
plots the first function with magenta impulses, while the
second function is ploted with the blue step function.
After enterning the function, you can write "w" or
"with", followed by one of the options: "l" (lines),
"i" (impulses), "d" (dots), "p" (points), "boxes" or "steps".
After the option you can enter the number of the color
( 1,
2, 3,
4, 5, ...).
Functions with parameter(s)
You can first define function which dependins on some parameter(s), and then
plot this function for several values of parameter(s). Here are some examples:
y=f(x):
y=f(x):
y=f(x):
Piece-wise defined functions y=f(x):
This function is equal to x^2 for x from
[-3:1],
x/3 for x from [5:7], and
sin(x) otherwise.
Note that the definition formally needs to cover the entire real line.
Periodic functions
Useful periodic functions can be obtained by using
floor, ceil and int, e.g.
y=f(x):
By using this or similar functions and the piece-wise
definition of functions, we can define periodic functions like:
y=f(x):
Intersections of surfaces
Consider the body which is bounded by the upper
semi-sphere
cos(u)*cos(v),sin(u)*cos(v),sin(v),
half od the cylinder
0.5*cos(u)+0.5,0.5*sin(u),v
for y<0 and the plane
u,0,v
(that is, y=0),
Ranges:
u
:
v
:
x
:
y
:
x=f(u,v),...:
The surface of this body is obtained as follows:
Ranges:
u
:
v
:
x
:
y
:
x=f(u,v),...:
N.B. The entire function input in the second example reads (only part can
be seen in the input window):
2006-07-16-20-25
NetPlot has next five different plot methods
1. y=f(x)
y as function of x
can not draw whole circle.
2. x=f(t), y=g(t) (You are using this one)
x as function of t, parametric
y as function of t, expression
t is independent variable.
CAN draw whole circle.
3. r=f(t)
for 2-D polar coordinate
Above draw line (one independent variable)
Below draw surface (two independent variable)
4. z=f(x,y)
for 3-D surface
can not draw whole sphere.
5. x=f(u,v), y=g(u,v), z=h(u,v)
for 3-D surface parametric expression.
CAN draw whole sphere.
NetPlot is a all-thing-considered program.
Freeman use [ 2. x=f(t), y=g(t) ]
as sample page. User can try other
flavor.
User can not access the source code of
this plot function. Because try
http://lavica.fesb.hr/netplot/en/t.php
without "?F=..."
get just broken picture. No source code
come to user. This means
This file works ONLY ONLINE.
The delivered answer is a picture file.
That is a plus. Because user no need to
copy whole screen then select the curve
part and save to file.
Freeman 2006-07-16-20-41.
This page URL
http://freeman2.com/graph05e.htm
First upload 2006-07-17
Thank you for visiting this page.
Freeman 2006-07-16-20-21