TableHeadings

TableHeadings
is an option for TableForm and MatrixForm which gives the labels to be printed for entries in each dimension of a table or matrix.

DetailsDetails

  • TableHeadings->None gives no labels in any dimension.
  • TableHeadings->Automatic gives successive integer labels for each entry in each dimension. »
  • TableHeadings->{{lbl11, lbl12, ...}, ...} gives explicit labels for each entry.
  • The labels can be strings or other Mathematica expressions. »
  • The labels are placed as headings for rows or columns.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

Give explicit headings for rows and columns:

In[1]:=
Click for copyable input
Out[1]//TableForm=

Specify headings only for rows:

In[2]:=
Click for copyable input
Out[2]//TableForm=

Specify headings only for columns:

In[3]:=
Click for copyable input
Out[3]//TableForm=
New in 2
New to Mathematica? Find your learning path »
Have a question? Ask support »