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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

axesWhile the basic purpose of an axes object is to provide a coordinate system forplotted data, axes properties provide considerable control over the way<strong>MATLAB</strong> displays data.Stretch-to-FillBy default, <strong>MATLAB</strong> stretches the axes to fill the axes position rectangle (therectangle defined by the last two elements in the Position property). Thisresults in graphs that use the available space in the rectangle. However, some3-D graphs (such as a sphere) appear distorted because of this stretching, andare better viewed with a specific three-dimensional aspect ratio.Stretch-to-fill is active when the DataAspectRatioMode,PlotBoxAspectRatioMode, and CameraViewAngleMode are all auto (thedefault). However, stretch-to-fill is turned off when the DataAspectRatio,PlotBoxAspectRatio, or CameraViewAngle is user-specified, or when one ormore of the corresponding modes is set to manual (which happensautomatically when you set the corresponding property value).This picture shows the same sphere displayed both with and without thestretch-to-fill. The dotted lines show the axes Position rectangle.18642024681−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1Stretch-to-fill active10.80.60.40.20−0.2−0.4−0.6−0.8−1−1 −0.5 0 0.5 1Stretch-to-fill disabledWhen stretch-to-fill is disabled, <strong>MATLAB</strong> sets the size of the axes to be as largeas possible within the constraints imposed by the Position rectangle withoutintroducing distortion. In the picture above, the height of the rectangleconstrains the axes size.2-5

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

Saved successfully!

Ooh no, something went wrong!