Align UI control components and axes objects
Use this function only with GUIDE, or with apps created using the
figure function.
align(
vertically aligns the specified components. The function aligns the left sides, centers,
or right sides of the objects depending on the value of components,valign,spacing)valign, and
adjusts the vertical spacing between the objects depending on the value of
spacing. For instance,
align(components,'left','none') aligns left edges and makes no
spacing adjustments. The size each object does not change.
align(
adjusts the vertical spacing to be a fixed distance in points.components,valign,'fixed',distance)
align(
horizontally aligns the specified components. The function aligns the top sides, middles,
or bottom sides of the objects depending on the value of components,spacing,halign)halign, and
adjusts the horizontal spacing between the objects depending on the value of
spacing. For instance,
align(components,'none','top') aligns top edges and makes no spacing
adjustments. The size of each object does not change.
align(
adjusts the vertical spacing to be a fixed distance in points.components,'fixed',distance,halign)
align(
aligns the specified objects overlapping one another. This is equivalent to aligning the
objects vertically according to components,valign,halign)valign and horizontally according to
halign. For example,
align(components,'left','top') aligns the top left corners of the
objects in components.
positions = align(___) returns the calculated
positions for the specified objects as a matrix if they are aligned, but does not move the
objects. Each row of the matrix output is a position vector. Use this option with any of
the input argument combinations in the previous syntaxes.
positions = align(
returns the calculated positions for the objects whose positions are contained in
cpositions,___)cpositions if they are aligned, but the positions of the objects on
the figure do not change. Use this option with any of the input combinations in the
previous syntaxes, replacing components with
cpositions.