view
Sets the viewpoint for the current axes.
Syntax
view(2)
view(3)
view(azimuth, elevation)
view([azimuth, elevation])
view([x, y, z])
view(hAxes, ...)
Inputs
- azimuth, elevation
- Spherical coordinates used to set the viewpoint. Azimuth is measured from the negative y axis to the positive x axis. Elevation is measured from the x-y plane to positive z axis.
- x, y, z
- Cartesian coordinates used to set the viewpoint.
- hAxes
- Axis handle.
Comments
view(2) sets the viewpoint at the positive z axis, which is the default viewpoint for a 2D plot.
view(3) sets the viewpoint at [azimuth = -45, elevation = 30], which is the default viewpoint of a 3D plot.