| Contents | Index |
![]()
To graph selected variables, use the Plot Selector
in the Workspace Browser,
or use the Figure Palette Plot Catalog. Manipulate graphs in plot
edit mode with the Property Editor. For details, see "Plotting
Tools — Interactive Plotting" in the MATLAB Graphics
documentation and "Creating
Graphics from the Workspace Browser" in the MATLAB Desktop
Tools and Development Environment documentation.
contourf(Z)
contourf(Z,n)
contourf(Z,v)
contourf(X,Y,Z)
contourf(X,Y,Z,n)
contourf(X,Y,Z,v)
contourf(...,LineSpec)
contourf(axes_handle,...)
contour(axes_handle,...)
[C,h] = contourf(...)
A filled contour plot displays isolines calculated from matrix Z and fills the areas between the isolines using constant colors corresponding to the current figure's colormap.
contourf(Z) draws a filled contour plot of matrix Z, where Z is interpreted as heights with respect to the x-y plane. Z must be at least a 2-by-2 matrix that contains at least two different values. The number of contour lines and the values of the contour lines are chosen automatically based on the minimum and maximum values of Z. The ranges of the x- and y-axis are [1:n] and [1:m], where [m,n] = size(Z).
contourf(Z,n) draws a filled contour plot of matrix Z with n contour levels.
contourf(Z,v) draws a filled contour plot of matrix Z with contour lines at the data values specified in the monotonically increasing vector v. The number of contour levels is equal to length(v). To draw a single contour of level i, use contour(Z,[i i]). Specifying the vector v sets the LevelListMode to manual to allow user control over contour levels. See contourgroup properties for more information.
contourf(X,Y,Z), contourf(X,Y,Z,n), and contourf(X,Y,Z,v) draw filled contour plots of Z using X and Y to determine the x- and y-axis limits. When X and Y are matrices, they must be the same size as Z and must be monotonically increasing.
contourf(...,LineSpec) draws the contour lines using the line type and color specified by LineSpec. contourf ignores marker symbols.
contourf(axes_handle,...) plots into the axes with the handle axes_handle instead of into the current axes (gca).
contour(axes_handle,...) plots into axes gerkaxes_handle instead of gca.
[C,h] = contourf(...) returns a contour matrix, C, that contains the x, y coordinates and contour levels for contour lines derived by the low-level contourc function, and a handle, h, to a contourgroup object containing the filled contours. The clabel function uses contour matrix C to label the contour lines. ContourMatrix is also a read-only Contourgroup property that you can obtain from the returned handle.
Use contourgroup object properties to control the filled contour plot appearance.
Label the contour lines using clabel.
NaNs in the Z-data leave white holes with black borders in the contour plot.
If X or Y is irregularly spaced, contourf calculates contours using a regularly spaced contour grid, and then transforms the data to X or Y.
Create a filled contour plot of the peaks function with contour matrix and contourgroup object handle as output and autumn colormap.
[C,h] = contourf(peaks(20),10); colormap autumn

For more examples using contourf, see Contour Plots.
clabel | contour | contour3 | contourc | contourgroup properties | quiver

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |