1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
.TH contour2d 2 "April 1993" "Scilab Group" "Scilab Function"
.so ../sci.an
.SH NAME
contour2d - level curves of a surface on a 2D plot
.SH CALLING SEQUENCE
.nf
contour2d(x,y,z,nz,[style,strf,leg,rect,nax])
contour2d(x,y,z,nz,<opt_args>)
.fi
.SH PARAMETERS
.TP 5
x,y
: two real row vectors of size n1 and n2: the grid.
.TP 5
z
: real matrix of size (n1,n2), the values of the function.
.TP 5
nz
: the level values or the number of levels.
.RS
.TP 3
-
If \fVnz\fR is an integer, its value gives the number of level curves
equally spaced from zmin to zmax as follows:
.nf
z= zmin + (1:nz)*(zmax-zmin)/(nz+1)
.fi
Note that the \fVzmin\fR and \fVzmax\fR levels are not drawn
(generically they are reduced to points) but they can be added
with
.nf
[im,jm] = find(z == zmin); // or zmax
plot2d(x(im)',y(jm)',-9,"000")
.fi
.TP
-
If \fVnz\fR is a vector, \fVnz(i)\fR gives the value of the ith level curve.
.RE
<opt_args>
: This represents a sequence of statements \fVkey1=value1,
key2=value2\fR,... where \fVkey1\fR, \fVkey2,...\fR can be one of the
following: style, leg, rect, nax, strf or axesflag and frameflag (see plot2d)
.TP 5
style,strf,leg,rect,nax
: see \fVplot2d\fR. The argument \fVstyle\fR gives the dash styles or colors
which are to be used for level curves. It must have the same size as
the number of levels.
.SH DESCRIPTION
\fVcontour2d\fR draws level curves of a surface \fVz=f(x,y)\fR on a 2D plot.
The values of \fVf(x,y)\fR are given by the matrix \fVz\fR at the
grid points defined by \fVx\fR and \fVy\fR.
You can change the format of the floating point number printed on the levels
by using \fVxset("fpf",string)\fR where \fVstring\fR gives the
format in C format syntax (for example \fVstring="%.3f"\fR). Use
\fVstring=""\fR to switch back to default format.
.LP
The optional arguments \fVstyle,strf,leg,rect,nax\fR, can be passed by
a sequence of statements \fVkey1=value1, key2=value2\fR, ... where
keys may be \fVstyle\fR,\fVstrf\fR,\fVleg\fR,\fVrect\fR,\fVnax\fR. In
this case, the order has no special meaning.
Use \fVcontour\fR to draw levels curves on a 3D surface.
Enter the command \fVcontour2d()\fR to see a demo.
.SH EXAMPLE
.nf
contour2d(1:10,1:10,rand(10,10),5,rect=[0,0,11,11])
// changing the format of the printing of the levels
xset("fpf","%.2f")
xbasc()
contour2d(1:10,1:10,rand(10,10),5,rect=[0,0,11,11])
.fi
.SH SEE ALSO
contour, fcontour, fcontour2d, contour2di, plot2d, xset
.SH AUTHOR
J.Ph.C.
|