Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Visualization and Graphics > Data Visualization > Annotating & Combining Graphics > Combining Graphics >
Mathematica > Visualization and Graphics > Function Visualization > Annotating & Combining Graphics > Combining Graphics >

Alignment

Alignment
is an option which specifies how the contents of a displayed object should be aligned within the available area in the object.
  • The following settings can be given:
Automaticdefault alignment based on environment
Leftleft aligned
Rightright aligned
Toptop aligned
Bottombottom aligned
Baselinebaseline aligned
Centercentered
{h,v}separate horizontal and vertical alignments
xaligned at position x from -1 (left) to +1 (right)
{x,y}aligned at horizontal and vertical positions x and y from -1 to +1
"c"aligned on the specified character in a grid
  • In Alignment->{x, y}, y values run from -1 at the bottom to +1 at the top.
  • Alignment->spec indicates that the spec element of an object should align with the spec element of whatever object contains it.
  • With Alignment->Automatic, the alignment for the contents of an object will be based on the alignment specified for whatever object contains it.
  • For objects such as Grid, Column and GraphicsGrid, the setting for Alignment can be a list that specifies alignments for individual columns, rows or elements.
Align elements around the center of the grid:
Different predefined alignment options for Button:
Align expressions within the panel:
Align elements around the center of the grid:
In[1]:=
Click for copyable input
Out[1]=
 
Different predefined alignment options for Button:
In[1]:=
Click for copyable input
Out[1]=
 
Align expressions within the panel:
In[1]:=
Click for copyable input
Out[1]=
Align the contents of a grid to the left:
Align numbers on the decimal point:
Align an element within a grid:
Align the columns of a grid separately:
Align a set of elements within a grid:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team