Main Content

contour3m

Project 3-D contour plot of map data

Description

Thecontour3mfunction is the same as thecontourmfunction except that the lines for each contour level are drawn in their own horizontal plane, at thez-coordinate equal to the value of that level.

Examples

collapse all

Get geoid heights and a geographic postings reference object from the EGM96 geoid model. Then, create a 3-D contour plot with 40 contour levels using a Miller projection. Eliminate extra white space usingtightmap.

[N,R] = egm96geoid; axesmmillercontour3m(N,R,40,'LineColor','k') tightmap

Figure contains an axes object. The axes object contains 40 objects of type line.

Add the geoid as a surface, exaggerate the aspect ratio of the axes usingdaspect, and view the map in 3-D.

holdongeoshow(N,R,'DisplayType','surface') daspect([1 1 50]) view(3)

Figure contains an axes object. The axes object contains 41 objects of type line, surface.

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 elevation raster data and a geographic cells reference object. Crop the data to an area around South Asia.

loadtopo60clatlim = [0 50]; lonlim = [35 115]; [Z,R] = geocrop(topo60c,topo60cR,latlim,lonlim);

Display the data as a contour plot using a standard Lambert conformal conic projection.

figure axesm('lambertstd','MapLatLimit',latlim,'MapLonLimit',lonlim) tightmap axisoffcontour3m(Z,R,'k','LevelStep',500)

Display the topography as a surface. Apply a colormap appropriate for elevation data using thedemcmapfunction. Then, add a title.

geoshow(Z,R,'DisplayType','surface') demcmap(Z) title({'South Asia Topography and Bathymetry',...'with 500 m Contours'});

View the display in 3-D.

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

Tips

  • If you usecontour3mwith theglobemap display, thecontour3mfunction warns. Be careful to scale the input data relative to the radius of your reference sphere.

版本历史

Introduced before R2006a