Main Content

daspectm

Control vertical exaggeration of axesm-based map

Syntax

daspectm(zunits)
daspectm(zunits,vfac)
daspectm(zunits,vfac,lat,long)
daspectm(zunits,vfac,lat,long,az)
daspectm(zunits,vfac,lat,long,az,radius)

Description

daspectm(zunits) sets the 'DataAspectRatio' property of the axesm-based map so that the z-axis is in proportion to the x-and y-projected coordinates. This permits elevation data to be displayed without vertical distortion. The zunits parameter specifies the units of the elevation data, and can be any length units recognized by unitsratio.

daspectm(zunits,vfac) sets the 'DataAspectRatio' property so that the z-axis is vertically exaggerated by the factor vfac. If omitted, the default is no vertical exaggeration.

daspectm(zunits,vfac,lat,long) sets the aspect ratio based on the local map scale at the specified geographic location. If omitted, the default is the center of the map limits.

daspectm(zunits,vfac,lat,long,az) also specifies the direction along which the scale is computed. If omitted, 90 degrees (west) is assumed.

daspectm(zunits,vfac,lat,long,az,radius) specifies the radius of the sphere. radius can be one of the values supported by km2deg, or it can be the (numerical) radius of the desired sphere in zunits. If omitted, the default radius of the Earth is used.

Examples

collapse all

Load elevation data and a geographic cells reference object for the Korean peninsula. Create a world map with appropriate latitude and longitude limits, then display the data using meshm. Apply a colormap appropriate for elevation data using demcmap. Then, view the map in 3-D.

load korea5c
latlim = korea5cR.LatitudeLimits;
lonlim = korea5cR.LongitudeLimits;
worldmap(latlim,lonlim)
meshm(korea5c,korea5cR,korea5cR.RasterSize,korea5c)
demcmap(korea5c)
view(3)

Set the vertical exaggeration factor to 30 using daspectm. Add light using camlight.

daspectm('m',30)
camlight

Limitations

The relationship between the vertical and horizontal coordinates holds only as long as the geoid or scale factor properties of the axesm-based map remain unchanged. If you change the scaling between geographic coordinates and projected axes coordinates, execute daspectm again.

Version History

Introduced before R2006a