23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Axes Properties<br />

2-114<br />

• z-axis values increase pointing out of the screen (2-D view) or from bottom to<br />

top (3-D view). To reverse the direction of increasing z values, set this<br />

property to reverse.<br />

set(gca,'ZDir','reverse')<br />

XGrid, YGrid, ZGrid on | {off}<br />

Axis gridline mode. When you set any of these properties to on, <strong>MATLAB</strong> draws<br />

grid lines perpendicular to the respective axis (i.e., along lines of constant x, y,<br />

or z values). Use the grid command to set all three properties on or off at once.<br />

set(gca,'XGrid','on')<br />

XLabel, YLabel, ZLabelhandle of text object<br />

Axis labels. The handle of the text object used to label the x, y, or z-axis,<br />

respectively. To assign values to any of these properties, you must obtain the<br />

handle to the text string you want to use as a label. This statement defines a<br />

text object and assigns its handle to the XLabel property:<br />

set(get(gca,'XLabel'),'String','axis label')<br />

<strong>MATLAB</strong> places the string 'axis label' appropriately for an x-axis label. Any<br />

text object whose handle you specify as an XLabel, YLabel, orZLabel property<br />

is moved to the appropriate location for the respective label.<br />

Alternatively, you can use the xlabel, ylabel, and zlabel functions, which<br />

generally provide a simpler means to label axis lines.<br />

XLim, YLim, ZLim [minimum maximum]<br />

Axis limits. A two-element vector specifying the minimum and maximum<br />

values of the respective axis.<br />

Changing these properties affects the scale of the x-, y-, or z-dimension as well<br />

as the placement of labels and tick marks on the axis. The default values for<br />

these properties are [0 1].<br />

XLimMode, YLimMode, ZLimMode{auto} | manual<br />

<strong>MATLAB</strong> or user-controlled limits. The axis limits mode determines whether<br />

<strong>MATLAB</strong> calculates axis limits based on the data plotted (i.e., the XData,<br />

YData, or ZData of the axes children) or uses the values explicitly set with the<br />

XLim, YLim,orZLim property, in which case, the respective limits mode is set to<br />

manual.

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

Saved successfully!

Ooh no, something went wrong!