Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

contour3m

Project 3-D contour plot of map data

Description

The contour3m function is the same as the contourm function except that the lines for each contour level are drawn in their own horizontal plane, at the z-coordinate equal to the value of that level.

Examples

collapse all

This example shows how to contour the EGM96 geoid heights in an ordinary axes as a 3-D surface with 50 levels and set the contour line color to black.

Load the geoid.

figure('Color','white')
load geoid
contour3m(geoid,geoidrefvec,50,'LineColor','black');

Add the geoid as a surface.

hold on
geoshow(geoid,geoidrefvec,'DisplayType','surface')

Add a title.

title('EGM96 Global Geoid Heights with 50 Contour Levels');

View in 3-D.

view(3)

This example shows how to contour in a map axes the topography and bathymetry of South Asia and the northern Indian Ocean with a contour interval of 500 meters.

Load topo.

load topo
latlim = [ 0  50];
lonlim = [35 115];
[Z, refvec] = maptrims(topo, topolegend, latlim, lonlim);
figure('Color','white')
axesm('lambertstd','MapLatLimit', latlim, 'MapLonLimit', lonlim)
tightmap; axis off
contour3m(Z,refvec,'black','LevelStep',500)

Add the geoid as a surface and set the colormap.

geoshow(Z,refvec,'DisplayType','surface')
demcmap(Z)

Add a title.

title({'South Asia Topography and Bathymetry', ...
   'with 500 m Contours'});

View in 3-D

set(gca,'DataAspectRatio',[1 1 40000])
view(3)

Tips

  • If you use contour3m with the globe map display, the contour3m function warns. Be careful to scale the input data relative to the radius of your reference sphere.

Introduced before R2006a

Was this topic helpful?