| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Mapping Toolbox |
| Contents | Index |
| Learn more about Mapping Toolbox |
contour3m(Z,R)
contour3m(lat,lon,Z)
contour3m(Z,R,n) or contour3m(lat,lon,Z,n)
contour3m(Z,V,R) or contour3m(lat,lon,Z,V)
contour3m(..., linespec)
contour3m(..., prop1, val1, prop2,
val2,...)
C = contour3m(...)
[C,h] = contour3m(...)
contour3m(Z,R) displays a contour plot of the regular M-by-N data grid, Z. R is either a 1-by-3 vector containing elements:
[cells/degree northern_latitude_limit western_longitude_limit]
or a 3-by-2 referencing matrix that transforms raster row and column indices to or from geographic coordinates according to:
[lon lat] = [row col 1] * R
If R is a referencing matrix, it must define a (non-rotational, non-skewed) relationship in which each column of the data grid falls along a meridian and each row falls along a parallel. If the current axis is a map axis, the coordinates of Z will be projected using the projection structure from the axis. The contours are drawn at their corresponding Z level. For more information about referencing vectors and matrices, see the section Understanding Raster Geodata in the User's Guide.
contour3m(lat,lon,Z) displays a contour plot of the geolocated M-by-N data grid, Z. lat and lon can be the size of Z or can specify the corresponding row and column dimensions for Z.
contour3m(Z,R,n) or contour3m(lat,lon,Z,n) where n is a scalar, draws n contour levels.
contour3m(Z,V,R) or contour3m(lat,lon,Z,V) where V is a vector, draws contours at the levels specified by the input vector v. Use V = [v v] to compute a single contour at level v.
contour3m(..., linespec) uses any valid LineSpec string to draw the contour lines.
contour3m(..., prop1, val1, prop2, val2,...) specifies property/value pairs that modify LINE graphics properties. Property names can be abbreviated and are case-insensitive.
C = contour3m(...) returns a standard contour matrix, C, with the first row representing longitude data and the second row representing latitude data.
[C,h] = contour3m(...) returns the contour matrix and the line handles to the contour lines drawn onto the current axes.
Make a default contour map of world topography data
load topo axesm robinson; framem; view(3) contour3m(topo,topolegend) set(gca,'DataAspectRatio',[1 1 3000])

Contour EGM96 geoid heights as a 3-D surface with 50 levels, set contour patch edge color to black, show the geoid surface under and coastlines above the contour lines on an orthographic projection.
load geoid
axesm ortho
% Contour the geoid surface in black using 50 levels
[c,h]=contour3m(geoid, geoidrefvec, 50,'EdgeColor','black');
% Add the geoid surface.
hold on
geoshow(geoid,geoidrefvec,'DisplayType','surface')
% Add a title and colorbar.
title('EGM96 Geoid Heights with 50 Contour Levels');
colorbar
% Set the colormap to blue - green
colormap('winter')
% Set the Z-datum so that all contours show
zdatam(handlem('surface'),min(geoid(:)));
% Get world coastlines and plot them in gold
landareas = shaperead('landareas.shp','UseGeoCoords',true);
geoshow(landareas,'DisplayType','Polygon',...
'FaceColor','None','EdgeColor',[.9 .9 .4])

Display the EGM96 geoid height contours in a default world map.
load geoid
figure
worldmap('world');
% Contour the geoid height with 10 levels and
% set the color to magenta.
[c,h]=contour3m(geoid, geoidrefvec, 10,'m');
% Add the geoid surface.
hold on
geoshow(geoid,geoidrefvec,'DisplayType','surface')
% Set the surface to the minimum height of the geoid.
% to keep the contours visible.
zdatam(handlem('surface'),min(geoid(:)));
% Add a title.
title('EGM96 Geoid Heights with 10 Contour Levels');

clabel, clabelm, clegendm, contour, contour3, contourm, geoshow, plot
![]() | cometm | contourcmap | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |