Main Content

camproj

Set or query projection type

Syntax

camproj
camproj('projection_type')
camproj(axes_handle,...)

Description

camproj returns the projection type setting in the current axes. The projection type determines whether MATLAB® 3-D views use a perspective or orthographic projection.

camproj('projection_type') sets the projection type in the current axes to the specified value. Possible values for projection_type are orthographic and perspective.

camproj(axes_handle,...) performs the set or query on the axes identified by the first argument, axes_handle. When you do not specify an axes handle, camproj operates on the current axes.

camproj sets or queries values of the axes object Projection property.

Examples

collapse all

Plot two surfaces and set the projection to 'perspective' for the first axes. The second axes uses the default projection, which is 'orthographic'.

tiledlayout(1,2)
nexttile
surf(membrane) 
camproj('perspective')

nexttile
surf(membrane) 

Figure contains 2 axes objects. Axes object 1 contains an object of type surface. Axes object 2 contains an object of type surface.

Version History

Introduced before R2006a