Nelson
  • Nelson GitBook 📚
  • docs
    • Nelson Documentation
  • markdown
    • Languages
    • en
      • Summary
      • Assertion functions
        • SUMMARY
        • assert
        • assert_checkerror
        • assert_isapprox
        • assert_isequal
        • assert_isfalse
        • assert_istrue
      • Audio playback
        • SUMMARY
        • audiodevinfo
        • audioinfo
        • audiometadata
        • audioplayer
        • audioplayer_delete
        • audioplayer_fieldnames
        • audioplayer_get
        • audioplayer_pause
        • audioplayer_set
        • audioplayer_stop
        • audioplayer_used
        • audioread
        • audiosupportedformats
        • audiowrite
        • beep
        • isplaying
        • lin2mu
        • mu2lin
        • play
        • playblocking
        • resume
        • sound
        • soundsc
        • stop
      • changelogs
        • CHANGELOG-0.1.x
        • CHANGELOG-0.2.x
        • CHANGELOG-0.3.x
        • CHANGELOG-0.4.x
        • CHANGELOG-0.5.x
        • Changelog
        • Changelog
        • Changelog
      • Characters encoding
        • SUMMARY
        • native2unicode
        • nativecharset
        • unicode2native
      • COM engine
        • COM examples
        • COM_delete
        • COM_fieldnames
        • COM_get
        • COM_invoke
        • COM_ismethod
        • COM_isprop
        • COM_methods
        • COM_range
        • COM_set
        • COM_used
        • COM_xlsfinfo
        • COM_xlsread
        • COM_xlswrite
        • SUMMARY
        • actxGetRunningServer
        • actxcontrollist
        • actxserver
        • actxserverlist
        • iscom
      • Console
        • SUMMARY
        • clc
        • input
        • terminal_size
      • Constructors functions
        • Inf
        • NaN
        • SUMMARY
        • diag
        • eps
        • eye
        • i
        • ones
        • pi
        • zeros
      • Control System functions
        • SUMMARY
        • abcdchk
        • acker
        • append
        • augstate
        • balreal
        • bdschur
        • bode
        • c2d
        • care
        • cloop
        • compreal
        • ctrb
        • ctrbf
        • d2c
        • damp
        • dare
        • dcgain
        • dlqr
        • dlyap
        • dsort
        • esort
        • evalfr
        • feedback
        • freqresp
        • gensig
        • gram
        • hsvd
        • impulse
        • initial
        • isct
        • isdt
        • islti
        • issiso
        • isstatic
        • kalman
        • lqe
        • lqed
        • lqr
        • lqry
        • lsim
        • lyap
        • minreal
        • nyquist
        • obsv
        • obsvf
        • ord2
        • padecoef
        • parallel
        • pole
        • series
        • ss
        • ss2tf
        • ssdata
        • ssdelete
        • ssselect
        • step
        • tf
        • tf2ss
        • tfdata
        • tzero
        • zero
      • Core
        • SUMMARY
        • banner
        • eval
        • evalc
        • evalin
        • execstr
        • exist
        • exit
        • feature
        • inputname
        • isunicodesupported
        • license
        • maxNumCompThreads
        • namelengthmax
        • nargin
        • narginchk
        • nargout
        • nargoutchk
        • nelsonroot
        • nfilename
        • pause
        • prefdir
        • quit
        • run
        • sha256
        • version
      • Data analysis
        • SUMMARY
        • conv
        • conv2
        • cumprod
        • cumsum
        • ismissing
        • issorted
        • max
        • min
        • prod
        • sort
        • sum
        • unique
      • Data structures
        • SUMMARY
        • cell
        • cell2mat
        • cell2struct
        • celldisp
        • cellfun
        • cellstr
        • fieldnames
        • getfield
        • iscellstr
        • isfield
        • namedargs2cell
        • num2cell
        • orderfields
        • rmfield
        • setfield
        • struct
        • struct2cell
      • Debugger functions
        • SUMMARY
        • dbstack
      • Dictionaries
        • SUMMARY
        • configureDictionary
        • dictionary
        • entries
        • insert
        • isConfigured
        • isKey
        • keyHash
        • keyMatch
        • keys
        • lookup
        • numEntries
        • remove
        • types
        • values
      • Display format
        • SUMMARY
        • disp
        • display
        • echo
        • format
        • formattedDisplayText
      • Double
        • SUMMARY
        • double
        • flintmax
        • realmax
        • realmin
      • Dynamic link
        • Build C/C++ code on the fly
        • Supported C/C++ compilers
        • libpointer datatype
        • SUMMARY
        • cmake
        • configuremingw
        • configuremsvc
        • dlcall
        • dlclose
        • dlgeneratecleaner
        • dlgenerategateway
        • dlgenerateloader
        • dlgeneratemake
        • dlgenerateunloader
        • dlgetnelsonincludes
        • dlgetnelsonlibraries
        • dllib_used
        • dllibinfo
        • dllibisloaded
        • dlmake
        • dlopen
        • dlsym
        • dlsym_delete
        • dlsym_used
        • findcmake
        • getdynlibext
        • havecompiler
        • libpointer
        • libpointer_delete
        • libpointer_isNull
        • libpointer_plus
        • libpointer_reshape
        • libpointer_setdatatype
        • libpointer_used
        • loadcompilerconf
        • removecompilerconf
        • vswhere
      • Elementary functions
        • SUMMARY
        • abs
        • allfinite
        • angle
        • base2dec
        • bernsteinMatrix
        • bin2dec
        • bin2num
        • blkdiag
        • cast
        • ceil
        • circshift
        • complex
        • conj
        • deal
        • dec2base
        • dec2bin
        • dec2hex
        • exp
        • factorial
        • filter
        • find
        • fix
        • flip
        • flipdim
        • fliplr
        • flipud
        • floor
        • hadamard
        • hankel
        • hex2dec
        • hilb
        • hypot
        • imag
        • ind2sub
        • invhilb
        • ipermute
        • isapprox
        • iscolumn
        • istriu
        • isequal
        • isequaln
        • isequalto
        • isfinite
        • isinf
        • ismatrix
        • isnan
        • isrow
        • isscalar
        • istril
        • istriu
        • isvector
        • length
        • linspace
        • log
        • log10
        • log1p
        • log2
        • logspace
        • magic
        • meshgrid
        • minus
        • mod
        • ndgrid
        • ndims
        • nextpow2
        • norm
        • normest
        • nthroot
        • num2bin
        • numel
        • permute
        • pinv
        • pow2
        • real
        • rem
        • repmat
        • reshape
        • rosser
        • rot90
        • round
        • shiftdim
        • sign
        • size
        • sqrt
        • squeeze
        • sub2ind
        • substruct
        • swapbytes
        • toeplitz
        • tril
        • triu
        • vander
        • wilkinson
      • Engine
        • SUMMARY
        • argv
        • executable
        • finish
        • getnelsonmode
        • isquietmode
        • System Requirements
        • #! shebang
        • startup
      • Error manager
        • MException
        • SUMMARY
        • error
        • getLastReport
        • lasterror
        • lastwarn
        • rethrow
        • throw
        • throwAsCaller
        • warning
      • Fortran to C
        • SUMMARY
        • f2c
      • FFTW
        • FFTW License
        • FFTWwrapper
        • SUMMARY
        • fft
        • fft2
        • fftn
        • fftshift
        • fftw
        • ifft
        • ifftn
        • ifftshift
      • File archiver functions
        • SUMMARY
        • unzip
        • zip
      • Files and folders functions
        • SUMMARY
        • cd
        • copyfile
        • diff_file
        • dir
        • fileparts
        • filesep
        • fullfile
        • fullpath
        • isdir
        • isfile
        • isfolder
        • ls
        • mkdir
        • pathsep
        • pwd
        • relativepath
        • rmdir
        • rmfile
        • tempdir
        • tempname
        • userdir
      • Function_handle functions
        • SUMMARY
        • Anonymous Functions
        • func2str
        • isfunction_handle
        • str2func
      • Functions manager
        • SUMMARY
        • addpath
        • builtin
        • clearfun
        • feval
        • inmem
        • isbuiltin
        • ismacro
        • ismex
        • macroargs
        • path
        • private functions
        • rehash
        • restoredefaultpath
        • rmpath
        • userpath
        • what
        • which
      • Geometry
        • SUMMARY
        • rotx
        • roty
        • rotz
      • Graphics functions
        • SUMMARY
        • abyss
        • ancestor
        • autumn
        • axes
        • axis
        • bar
        • bone
        • cla
        • clf
        • clim
        • close
        • colorbar
        • colormap
        • colstyle
        • contour
        • contour3
        • cool
        • copper
        • cylinder
        • drawnow
        • figure
        • fill
        • frame2im
        • gca
        • gcf
        • getframe
        • Managing Callback Interruptions in Nelson
        • gray
        • grid
        • groot
        • hggroup
        • hist
        • hold
        • hot
        • im2double
        • im2frame
        • image
        • imagesc
        • imread
        • imshow
        • imwrite
        • is2D
        • isValidGraphicsProperty
        • isgraphics
        • ishold
        • jet
        • legend
        • line
        • loglog
        • mesh
        • meshz
        • movie
        • newplot
        • pan
        • parula
        • patch
        • pcolor
        • pie
        • pink
        • plot
        • plot3
        • quiver
        • refresh
        • rgbplot
        • ribbon
        • rotate3d
        • saveas
        • scatter
        • semilogx
        • semilogy
        • sky
        • sphere
        • spring
        • spy
        • stairs
        • stem
        • subplot
        • summer
        • surf
        • surface
        • text
        • title
        • turbo
        • uicontrol
        • validatecolor
        • view
        • viridis
        • waitfor
        • waitforbuttonpress
        • waterfall
        • white
        • winter
        • xlabel
        • xlim
        • ylabel
        • ylim
        • zlabel
        • zlim
        • zoom
      • Graphics I/O functions
        • SUMMARY
        • copygraphics
        • imformats
        • imread
        • imwrite
        • saveas
      • Gui module
        • SUMMARY
        • commandhistory
        • errordlg
        • filebrowser
        • helpdlg
        • inserthtml
        • lookandfeel
        • msgbox
        • qt_verbose
        • questdlg
        • uigetdir
        • helpdlg
        • workspace
      • Handle
        • SUMMARY
        • delete
        • get
        • invoke
        • ismethod
        • isprop
        • isvalid
        • methods
        • properties
        • set
      • HDF5
        • SUMMARY
        • h5create
        • h5dump
        • h5ls
        • h5read
        • h5readatt
        • h5write
        • h5writeatt
        • isnh5file
        • loadnh5
        • savenh5
        • whonh5
        • whosnh5
      • Help browser functions
        • SUMMARY
        • doc
        • helpbrowser
      • Help tools functions
        • SUMMARY
        • buildhelp
        • buildhelpmd
        • buildhelpweb
        • docroot
        • headcomments
        • htmltopdf
        • markdown
        • xmldocbuild
        • xmldocchecker
        • xmldoctohelp
        • xmldoctohtml
        • xmldoctomd
      • History manager
        • SUMMARY
        • history
      • I18n functions
        • SUMMARY
        • gettext
        • i18nHelpers
        • poheader
      • Integers type
        • SUMMARY
        • int16
        • int32
        • int64
        • int8
        • intmax
        • intmin
        • uint16
        • uint32
        • uint64
        • uint8
      • Interpreter functions
        • SUMMARY
        • abort
        • break
        • continue
        • for
        • function
        • if
        • iskeyword
        • keyboard
        • max_recursion_depth
        • numeric types
        • parsefile
        • parsestring
        • switch
        • try
        • while
      • Inter Process Communication
        • SUMMARY
        • getpid
        • ipc
      • JavaScript Object Notation
        • SUMMARY
        • jsondecode
        • jsonencode
        • jsonprettyprint
      • Julia engine
        • SUMMARY
        • jlenv
        • jlrun
        • jlrunfile
        • Julia Nelson types
      • license
        • gpl-3.0
        • GNU LESSER GENERAL PUBLIC LICENSE
        • Nelson license:
      • Linear algebra
        • SUMMARY
        • balance
        • bandwidth
        • chol
        • cond
        • condeig
        • det
        • diff
        • eig
        • expm
        • gradient
        • inv
        • isbanded
        • ishermitian
        • issymmetric
        • kron
        • logm
        • lu
        • orth
        • planerot
        • rank
        • rcond
        • rref
        • rsf2csf
        • schur
        • sqrtm
        • subspace
        • svd
        • trace
        • vecnorm
      • Localization functions
        • SUMMARY
        • getavailablelanguages
        • getdefaultlanguage
        • getlanguage
        • setlanguage
      • Logical type functions
        • SUMMARY
        • false
        • logical
        • true
        • xor
      • MATIO
        • SUMMARY
        • ismatfile
        • loadmat
        • savemat
        • whomat
        • whosmat
      • Memory manager functions
        • SUMMARY
        • acquirevar
        • assignin
        • clear
        • global
        • isglobal
        • isvar
        • memory
        • persistent
        • varislock
        • varlock
        • varunlock
        • who
        • whos
      • MEX functions
        • SUMMARY
        • dlgeneratemexgateway
        • engClose
        • engEvalString
        • engGetVariable
        • engGetVisible
        • engOpen
        • engOpenSingleUse
        • engOutputBuffer
        • engPutVariable
        • engSetVisible
        • mex
        • mexAtExit
        • mexCallMATLAB
        • mexCallMATLABWithTrap
        • mexext
      • Modules manager
        • SUMMARY
        • addgateway
        • addmodule
        • gatewayinfo
        • getmodules
        • ismodule
        • module.json
        • modulepath
        • nmm
        • nmm_build_help
        • nmm_build_loader
        • removegateway
        • removemodule
        • requiremodule
        • semver
        • toolboxdir
        • usermodulesdir
      • Message Passing Interface
        • MPI_Allreduce
        • MPI_Barrier
        • MPI_Bcast
        • MPI_Comm_delete
        • MPI_Comm_get_name
        • MPI_Comm_object
        • MPI_Comm_rank
        • MPI_Comm_size
        • MPI_Comm_split
        • MPI_Comm_used
        • MPI_Finalize
        • MPI_Get_library_version
        • MPI_Get_processor_name
        • MPI_Get_version
        • MPI_Init
        • MPI_Initialized
        • MPI_Iprobe
        • MPI_Probe
        • MPI_Recv
        • MPI_Reduce
        • MPI_Send
        • MPI examples
        • MPI overview
        • SUMMARY
        • mpiexec
      • NIG
        • SUMMARY
        • nig
      • Operators
        • SUMMARY
        • all
        • and
        • any
        • bitand
        • bitor
        • bitxor
        • cat
        • colon
        • ctranspose
        • eq
        • ge
        • gt
        • horzcat
        • ismember
        • ldivide
        • le
        • lt
        • minus
        • mldivide
        • mpower
        • mrdivide
        • mtimes
        • ne
        • not
        • or
        • plus
        • power
        • rdivide
        • shortcutand
        • shortcutor
        • subsasgn
        • subsindex
        • subsref
        • mtimes
        • transpose
        • uminus
        • uplus
        • vertcat
      • OS functions
        • SUMMARY
        • cmdsep
        • computer
        • createGUID
        • getenv
        • hostname
        • ismac
        • ispc
        • isunix
        • searchenv
        • setenv
        • system
        • username
        • winopen
        • winqueryreg
      • Overloading
        • SUMMARY
        • overloading
      • Parallel
        • SUMMARY
        • afterAll
        • afterEach
        • backgroundPool
        • cancel
        • cancelAll
        • fetchNext
        • fetchOutputs
        • parfeval
        • wait
      • Polynomials
        • SUMMARY
        • deconv
        • poly
        • polyder
        • polyfit
        • polyint
        • polyval
        • polyvalm
        • roots
      • Profiling tools
        • SUMMARY
        • profile
        • profsave
      • Python engine
        • The power of calling Python from Nelson
        • How to install python package
        • Python Nelson types
        • Python operators
        • SUMMARY
        • pyargs
        • pyenv
        • pyrun
        • pyrunfile
      • QML engine
        • QObject_classname
        • QObject_findchildren
        • QObject_get
        • QObject_iswidgettype
        • QObject_iswindowtype
        • QObject_methodsignature
        • QObject_root
        • QObject_set
        • QObject_undefine
        • QObject_used
        • SUMMARY
        • nelsonObject
        • qml_addimportpath
        • qml_addpluginpath
        • qml_clearcomponentcache
        • qml_collectgarbage
        • qml_createqquickview
        • qml_demos
        • qml_evaluatefile
        • qml_evaluatestring
        • qml_importpathlist
        • qml_loadfile
        • qml_loadstring
        • qml_offlinestoragepath
        • qml_pluginpathlist
        • qml_setofflinestoragepath
        • qt_constant
        • qt_version
      • Random
        • SUMMARY
        • rand
        • randn
        • randperm
        • rng
      • Signal Processing
        • SUMMARY
        • bartlett
        • blackman
        • db2mag
        • db2pow
        • filter2
        • hamming
        • hann
        • mag2db
        • pow2db
        • sinc
        • xcorr2
        • zp2tf
      • Single type
        • SUMMARY
        • single
      • SIO client
        • SUMMARY
        • doc
        • sioemit
        • siogetvariable
      • Subroutine Library In COntrol Theory
        • SLICOT License
        • SUMMARY
        • slicot_ab01od
        • slicot_ab04md
        • slicot_ab07nd
        • slicot_ab08nd
        • slicot_ag08bd
        • slicot_mb02md
        • slicot_mb03od
        • slicot_mb03pd
        • slicot_mb03rd
        • slicot_mb04gd
        • slicot_mb04md
        • slicot_mb05od
        • slicot_mc01td
        • slicot_sb01bd
        • slicot_sb02od
        • slicot_sb03md
        • slicot_sb03od
        • slicot_sb04md
        • slicot_sb04qd
        • slicot_sb10jd
        • slicot_sg02ad
        • slicot_tb01id
        • slicot_tg01ad
      • Sparse type
        • IJV
        • SUMMARY
        • full
        • nnz
        • nzmax
        • sparse
        • speye
        • spones
      • Special functions
        • SUMMARY
        • betainc
        • cross
        • dot
        • factor
        • gamma
        • gammaln
        • gcd
        • interp1
        • peaks
        • primes
      • Spreadsheet
        • SUMMARY
        • csvread
        • csvwrite
        • detectImportOptions
        • dlmread
        • dlmwrite
        • readcell
        • readmatrix
        • readtable
        • writecell
        • writematrix
        • writetable
      • Statistics
        • SUMMARY
        • corrcoef
        • cov
        • mean
        • normpdf
        • var
      • Stream manager
        • SUMMARY
        • diary
        • fclose
        • feof
        • ferror
        • fgetl
        • fgets
        • fileread
        • filewrite
        • fopen
        • fprintf
        • fread
        • frewind
        • fscanf
        • fseek
        • fsize
        • ftell
        • fwrite
        • load
        • save
        • sscanf
      • String type
        • SUMMARY
        • append
        • blanks
        • char
        • contains
        • convertCharsToStrings
        • convertStringsToChars
        • count
        • deblank
        • endsWith
        • int2str
        • isStringScalar
        • isletter
        • isspace
        • join
        • mat2str
        • matches
        • newline
        • num2str
        • replace
        • sprintf
        • startsWith
        • str2double
        • strcat
        • strcmp
        • strcmpi
        • strfind
        • string
        • strings
        • strjust
        • strlength
        • strncmp
        • strncmpi
        • strrep
        • strtrim
        • tolower
        • toupper
      • Tables
        • Accessing and Manipulating Tables in Nelson
        • Direct computation with Table
        • Read/Write table to files
        • SUMMARY
        • array2table
        • cell2table
        • head
        • height
        • istable
        • removevars
        • renamevars
        • struct2table
        • table
        • table2array
        • table2cell
        • table2struct
        • tail
        • width
      • Tests manager
        • SUMMARY
        • test_makeref
        • test_run
        • skip_testsuite
      • Text editor
        • SUMMARY
        • edit
        • editor
        • smartindent
      • Time functions
        • SUMMARY
        • addtodate
        • calendar
        • clock
        • cputime
        • date
        • datenum
        • datestr
        • datevec
        • eomday
        • etime
        • hour
        • leapyear
        • minute
        • now
        • second
        • sleep
        • tic
        • time
        • timeit
        • toc
        • weekday
      • Trigonometric functions
        • SUMMARY
        • acos
        • acosd
        • acosh
        • acot
        • acotd
        • acoth
        • acsc
        • acscd
        • acsch
        • asec
        • asecd
        • asech
        • asin
        • asind
        • asinh
        • atan
        • atan2
        • atan2d
        • atand
        • atanh
        • cart2pol
        • cart2sph
        • cos
        • cosd
        • cosh
        • cosm
        • cospi
        • cot
        • cotd
        • coth
        • csc
        • cscd
        • csch
        • deg2rad
        • pol2cart
        • rad2deg
        • sec
        • secd
        • sech
        • sin
        • sind
        • sinh
        • sinm
        • sinpi
        • sph2cart
        • tan
        • tand
        • tanh
        • tanm
      • Types module
        • SUMMARY
        • class
        • isa
        • iscell
        • ischar
        • isclass
        • isdouble
        • isempty
        • isfloat
        • ishandle
        • isint16
        • isint32
        • isint64
        • isint8
        • isinteger
        • islogical
        • isnumeric
        • isobject
        • isreal
        • issingle
        • issparse
        • isstring
        • isstruct
        • isuint16
        • isuint32
        • isuint64
        • isuint8
        • isvarname
      • Validators
        • SUMMARY
        • mustBeA
        • mustBeColumn
        • mustBeFile
        • mustBeFinite
        • mustBeFloat
        • mustBeFolder
        • mustBeGreaterThan
        • mustBeGreaterThanOrEqual
        • mustBeInRange
        • mustBeInteger
        • mustBeLessThan
        • mustBeLessThanOrEqual
        • mustBeLogical
        • mustBeLogicalScalar
        • mustBeMatrix
        • mustBeMember
        • mustBeNegative
        • mustBeNonNan
        • mustBeNonSparse
        • mustBeNonZero
        • mustBeNonempty
        • mustBeNonmissing
        • mustBeNonnegative
        • mustBeNonpositive
        • mustBeNonzeroLengthText
        • mustBeNumeric
        • mustBeNumericOrLogical
        • mustBePositive
        • mustBeReal
        • mustBeRow
        • mustBeScalarOrEmpty
        • mustBeSparse
        • mustBeText
        • mustBeTextScalar
        • mustBeValidVariableName
        • mustBeVector
      • Web tools
        • SUMMARY
        • checkupdate
        • repo
        • urlencode
        • weboptions
        • webread
        • websave
        • webwrite
    • fr
      • changelogs
        • CHANGELOG-0.1.x
        • CHANGELOG-0.2.x
        • CHANGELOG-0.3.x
        • CHANGELOG-0.4.x
        • CHANGELOG-0.5.x
        • Changelog
        • Changelog
        • Changelog
      • license
        • gpl-3.0
        • GNU LESSER GENERAL PUBLIC LICENSE
        • Nelson license:
Powered by GitBook
On this page
  • Syntax
  • Input argument
  • Output argument
  • Description
  • Examples
  • See also
  • History
  • Author

Was this helpful?

  1. markdown
  2. en
  3. Graphics functions

contour

Contour plot of matrix

Syntax

  • contour(Z)

  • contour(X, Y, Z)

  • contour(..., levels)

  • contour(..., LineSpec)

  • contour(ax, ...)

  • M = contour(...)

  • [M, h] = contour(...)

Input argument

  • X - x-coordinates: vector or matrix.

  • Y - y-coordinates: vector or matrix.

  • Z - z-coordinates: vector or matrix.

  • levels - Contour levels: scalar or vector.

  • LineSpec - Line style and color

  • ax - a scalar graphics object value: parent container, specified as a axes.

Output argument

  • M - Contour matrix.

  • h - a graphics object: contour type.

Description

contour(Z) generates a contour plot representing isolines of the matrix Z. Each isoline corresponds to a specific height value on the x-y plane.

Nelson automatically selects the contour lines to display based on the values in Z. The column and row indices of Z serve as the x and y coordinates in the plane, respectively.

contour(X, Y, Z) allows the user to specify the x and y coordinates corresponding to the values in matrix Z. This enables more precise control over the positioning of the contour plot on the x-y plane.

The matrices X and Y provide the coordinates, while Z contains the height values for generating the contour plot.

Property Name-Value Pairs:

LevelList: The contour levels, specified as a vector of z values, determine the height levels at which the contour lines are drawn. By default, when not explicitly provided, the contour function automatically selects these values to cover the range of values present in the ZData property, ensuring comprehensive coverage of the data range. Default: empty matrix.

LevelListMode: Selection mode for LevelList: 'manual' or 'auto' (default).

LevelStep: Spacing between contour lines: scalar numeric value or 0 (default).

LevelStepMode:Selection mode for LevelStep: 'manual' or 'auto' (default).

EdgeColor: Color of contour lines: rgb color or 'flat' (default).

EdgeAlpha: Contour line transparency: scalar in range [0, 1] or 1 (default).

LineStyle: Line style: '--', ':', '-.' or '-' (default).

LineWidth: Line Width: positive value or 0.5 (default).

ContourMatrix: contour matrix.

XData: x values: vector or matrix or [] (default).

YData: y values: vector or matrix or [] (default).

ZData: z values: vector or matrix or [] (default).

XDataMode: Selection mode for XData: 'manual' or 'auto' (default).

YDataMode: Selection mode for YData: 'manual' or 'auto' (default).

DisplayName: Legend label: character vector, string scalar or '' (default).

Visible: State of visibility: on/off logical value, 'on' (default).

Parent: Parent: Axes object or Group object.

Children: Children.

HandleVisibility: Visibility of handle 'on', 'off'.

Type: Type of graphics object 'contour'.

Tag: Object identifier: character vector, string scalar or '' (default).

UserData: User data: array or [] (default).

CreateFcnCallback (function handle, string or cell) called when object is created. Set this property on an existing component has no effect.

DeleteFcnCallback (function handle, string or cell) called when object is deleted.

BeingDeleted Flag indicating that the object is being deleted.

Examples

f = figure();
subplot(2, 3, 1)
x = linspace(-2 * pi, 2 * pi);
y = linspace(0, 4 * pi);
[X, Y] = meshgrid(x, y);
Z = sin(X) + cos(Y);
contour(X, Y, Z);

subplot(2, 3, 2)
[X, Y, Z] = peaks;
contour(X, Y, Z, 20)

subplot(2, 3, 3)
[X, Y, Z] = peaks;
v = [1,1];
contour(X, Y, Z, v)

subplot(2, 3, 4)
[X, Y, Z] = peaks;
contour(X, Y, Z, '-.')

subplot(2, 3, 5)
Z = peaks;
[M, c] = contour(Z);
c.LineWidth = 3;

subplot(2, 3, 6)
[theta, r] = meshgrid (linspace (0,2*pi,64), linspace (0,1,64));
[X, Y] = pol2cart (theta, r);
Z = sin (2*theta) .* (1-r);
contour (X, Y, abs (Z), 10);
rng('default');
f = figure();
N = 50;
contour(1:N, 1:N, rand(N), 5)
f = figure();
Z = peaks;
Z(:,26) = NaN;
contour(Z)

See also

History

Version
Description

1.3.0

initial version

1.7.0

CreateFcn, DeleteFcn callback added.

--

BeingDeleted property added.

Author

Allan CORNET

PreviouscolstyleNextcontour3

Last updated 8 months ago

Was this helpful?

, , .

contour3
surf
mesh