FreeMat
|
Section: Handle-Based Graphics
The view
function sets the view into the current plot. The simplest form is
view(n)
where n=2
sets a standard view (azimuth 0 and elevation 90), and n=3
sets a standard 3D view (azimuth 37.5 and elevation 30). With two arguments,
view(az,el)
you set the viewpoint to azimuth az
and elevation el
.
Here is a 3D surface plot shown with a number of viewpoints. First, the default view for a 3D plot.
--> x = repmat(linspace(-1,1),[100,1]); --> y = x'; --> r = x.^2+y.^2; --> z = exp(-r*3).*cos(5*pi*r); --> surf(x,y,z); --> axis equal --> view(3)
--> surf(x,y,z); --> axis equal --> view(2)
--> surf(x,y,z); --> axis equal --> view(25,50);