Scilab Reference Manual |
---|
contour2d — level curves of a surface on a 2D plot
contour2d(x,y,z,nz,[style,strf,leg,rect,nax]) contour2d(x,y,z,nz,<opt_args>)
x,y | : two real row vectors of size n1 and n2: the grid. | ||||
z | : real matrix of size (n1,n2), the values of the function. | ||||
nz | : the level values or the number of levels.
| ||||
<opt_args> | : This represents a sequence of statements key1=value1, key2=value2,... where key1, key2,... can be one of the following: style, leg, rect, nax, strf or axesflag and frameflag (see plot2d) | ||||
style,strf,leg,rect,nax | : see plot2d. The argument style 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. |
contour2d draws level curves of a surface z=f(x,y) on a 2D plot. The values of f(x,y) are given by the matrix z at the grid points defined by x and y.
You can change the format of the floating point number printed on the levels by using xset("fpf",string) where string gives the format in C format syntax (for example string="%.3f"). Use string="" to switch back to default format and Use string=" " to suppress printing.
The optional arguments style,strf,leg,rect,nax, can be passed by a sequence of statements key1=value1, key2=value2, ... where keys may be style,strf,leg,rect,nax. In this case, the order has no special meaning.
Use contour to draw levels curves on a 3D surface.
Enter the command contour2d() to see a demo.
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])
J.Ph.C.
<< contour2di | contourf >> |