TreeForm

TreeForm[expr]
displays expr as a tree with different levels at different depths.

TreeForm[expr,n]
displays expr as a tree only down to level n.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

A symbolic expression formatted as a tree:

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

Show the tree form for the first two levels in the expression:

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

A graphics expression formatted as a tree:

In[1]:=
Click for copyable input
Out[1]//TreeForm=
Introduced in 1988
(1.0)
| Updated in 2007
(6.0)