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
See also
History
1.3.0
initial version
1.7.0
CreateFcn, DeleteFcn callback added.
--
BeingDeleted property added.
Author
Allan CORNET
Last updated