12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

camvaSetting a camera view angle or setting the camera view angle to manualdisables <strong>MATLAB</strong>’s stretch-to-fill feature (stretching of the axes to fit thewindow). This means setting the camera view angle to its current value,camva(camva)can cause a change in the way the graph looks. See the Remarks section of theaxes reference page for more information.ExamplesThis example creates two pushbuttons, one that zooms in and another thatzooms out.uicontrol('Style','pushbutton',...'String','Zoom In',...'Position',[20 20 60 20],...'Callback','if camva = 179;return;else;camva(camva+1);end');Now create a graph to zoom in and out on:surf(peaks);Note the range checking in the callback statements. This keeps the values forthe camera view angle in the range, greater than zero and less than 180.See Alsoaxis, camproj, campos, camup, camtargetThe axes properties CameraPosition, CameraTarget, CameraUpVector,CameraViewAngle, Projection2-69

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!