contour2d - level curves of a surface on a 2D plot
z= zmin + (1:nz)*(zmax-zmin)/(nz+1)
Note that the zmin and zmax levels are not drawn (generically they are reduced to points) but they can be added with
[im,jm] = find(z == zmin); // or zmax plot2d(x(im)',y(jm)',-9,"000")
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") clf() contour2d(1:10,1:10,rand(10,10),5,rect=[0,0,11,11])
contour , fcontour , fcontour2d , contour2di , plot2d , xset ,
J.Ph.C.