Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2023.1.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Graphics > 2d_plot > contour2di


compute level curves of a surface on a 2D plot

Calling Sequence




two real row vectors of size n1 and n2: the grid.


real matrix of size (n1,n2), the values of the function.


the level values or the number of levels.

If nz is an integer, its value gives the number of level curves equally spaced from zmin to zmax as follows:

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 

If nz is a vector, nz(i) gives the value of the ith level curve.


vectors of identical sizes containing the contours definitions. See below for details.


contour2di computes 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.

xc(1) contains the level associated with first contour path, yc(1) contains the number N1 of points defining this contour path and (xc(1+(1:N1)), yc(1+(1:N1)) ) contain the coordinates of the paths points. The second path begin at xc(2+N1) and yc(2+N1) and so on.


while k+yc(k)<size(xc,'*')

See Also

  • contour — level curves on a 3D surface
  • fcontour — level curves on a 3D surface defined by a function. This function is obsolete.
  • fcontour2d — Level curves of a surface defined by a function on a 2D plot. This function is obsolete.
  • contour2d — level curves of a surface on a 2D plot
  • plot2d — 2D plot
  • xset — set values of the graphics context.This function is obsolete.
Report an issue
<< contour2d 2d_plot contourf >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:41:09 CEST 2012