This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Spacings

Spacings
is an option to Grid and related constructs that specifies the spacings to leave between successive objects.
  • A setting of the form Scaled[s] gives spacing that is a fraction s of the size of an item.
  • A setting of the form Spacings->v specifies that the absolute space between items should be v, independent of the presence of frames or dividers. A setting of the form Offset[v] inserts space v beyond space taken by frames or dividers.
  • Settings for Spacings in Grid and related constructs can be given as:
{specx,specy}use the at successive x and y positions
  • For a grid with n items in a particular direction, Spacings can specify settings for spacings in the n+1 gaps between items, starting before the first item, and ending after the last item.
  • The outer edge of the grid is taken to be at the midpoint of the outermost spacing on every side.
  • The in each direction can have the following forms:
{s1,s2,...,sn}use through , then use defaults
{{c}}use c in all cases
{{c1,c2}}alternate between and
{{c1,c2,...}}cycle through all
{s,{c}}use s, then repeatedly use c
{s1,{c},sn}use , then repeatedly use c, but use at the end
{s1,s2,...,{c1, c2, ... }, sm, ... , sn}
use the first sequence of at the beginning, then cyclically use the , then use the last sequence of at the end
{s1,s2,...,{},sm,...,sn}use the first sequence of at the beginning and the last sequence at the end
{i1->v1,i2->v2,...}specify what to use at positions
{spec,rules}use rules to override specifications in spec
Set the horizontal spacing between items:
Set the horizontal and vertical spacings:
Set the horizontal spacing between items:
In[1]:=
Click for copyable input
Out[1]=
 
Set the horizontal and vertical spacings:
In[1]:=
Click for copyable input
Out[1]=
Insert no additional space between columns:
Insert no additional space between rows or columns:
Use Offset to indicate spacings in addition to the thickness of any frames or dividers:
Insert additional space at the second horizontal divider:
Set the size of the grid's margins:
New in 6