Graphics | ![]() ![]() |
The axes Position
property controls the size and location of an axes within a figure. The default axes has the same aspect ratio (ratio of width to height) as the default figure and fills most of the figure, leaving a border around the edges. However, you can define the axes position as any rectangle and place it wherever you want within a figure.
The Position Vector
MATLAB defines the axes Position
property as a vector.
[left bottom width height]
left
and bottom
define a point in the figure that locates the lower-left corner of the axes rectangle. width
and height
specify the dimensions the axes rectangle. Viewing the axes in 2-D (azimuth = 0°, elevation = 90°) orients the x-axis horizontally and the y-axis vertically. From this angle, the plot box (the area used for plotting, exclusive of the axis labels) coincides with the axes rectangle.
The default 3-D view is azimuth = -37.5°, elevation = 30°.
By default, MATLAB draws the plot box to fill the axes rectangle, regardless of its shape. However, axes properties enable control over the shape and scaling of the plot box.
![]() | Labeling and Appearance Properties | Units | ![]() |