Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Graph Utilities Package >

ExpressionTreePlot

ExpressionTree[e]
plots the expression tree of e.

plots the expression tree of e with its root placed at position pos.

plots the expression tree of e up to level lev with its root placed at position pos.
An expression tree plot, with tooltips for each vertex giving the subexpression from that vertex down:
An expression tree up to level 2 with its root at the left:
Needs["GraphUtilities`"]
An expression tree plot, with tooltips for each vertex giving the subexpression from that vertex down:
In[2]:=
Click for copyable input
Out[2]=
An expression tree up to level 2 with its root at the left:
In[3]:=
Click for copyable input
Out[3]=
When Hold, HoldForm, etc. are used, the expressions inside them are not evaluated:
This gives an expression tree with no vertex labels, except that all subexpressions are shown as tooltips:
This plots a binary tree:
This plots a 5-ary tree:
TreeForm also gives the expression tree, although the orientation of the tree cannot be specified:
can specify root position:
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF