ExpressionTreePlot[e]
plots the expression tree of e.
ExpressionTreePlot[e,pos]
plots the expression tree of e with its root placed at position pos.
ExpressionTreePlot[e,pos,lev]
plots the expression tree of e up to level lev with its root placed at position pos.
ExpressionTreePlot
ExpressionTreePlot[e]
plots the expression tree of e.
ExpressionTreePlot[e,pos]
plots the expression tree of e with its root placed at position pos.
ExpressionTreePlot[e,pos,lev]
plots the expression tree of e up to level lev with its root placed at position pos.
Details and Options
- ExpressionTreePlot functionality is now available in the built-in Wolfram Language function TreeForm.
- To use ExpressionTreePlot, you first need to load the Graph Utilities Package using Needs["GraphUtilities`"].
- ExpressionTreePlot has the same options as TreePlot.
Examples
open all close allBasic Examples (2)
Needs["GraphUtilities`"]An expression tree plot, with tooltips for each vertex giving the subexpression from that vertex down:
ExpressionTreePlot[x ^ 2 + E ^ x + Sin[x]Cos[x]]ExpressionTreePlot has been superseded by TreeForm:
TreeForm[x ^ 2 + E ^ x + Sin[x]Cos[x]]Scope (2)
When Hold, HoldForm, etc. are used, the expressions inside them are not evaluated:
Needs["GraphUtilities`"]ExpressionTreePlot[Hold[1 + 2 + 3]]An expression tree up to level 2 with its root at the left:
ExpressionTreePlot[x ^ 2 + E ^ x + Sin[x]Cos[x], Left, 2]Options (1)
Applications (1)
Needs["GraphUtilities`"]ExpressionTreePlot[Nest[{#, #}&, x, 4], VertexLabeling -> Automatic]ExpressionTreePlot[Nest[{#, #, #, #, #}&, x, 3], Center, VertexLabeling -> Automatic, AspectRatio -> 1]Properties & Relations (1)
Needs["GraphUtilities`"]TreeForm also gives the expression tree, although the orientation of the tree cannot be specified:
expr = x ^ 2 + E ^ x + Sin[x]Cos[x];TreeForm[expr]ExpressionTreePlot can specify root position:
ExpressionTreePlot[expr, Center]Tech Notes
Related Guides
-
▪
- Graph Utilities Package ▪
- Graphs & Networks ▪
- Graph Visualization ▪
- Computation on Graphs ▪
- Graph Construction & Representation ▪
- Graphs and Matrices ▪
- Graph Properties & Measurements ▪
- Graph Operations and Modifications ▪
- Statistical Analysis ▪
- Social Network Analysis ▪
- Graph Properties ▪
- Mathematical Data Formats ▪
- Discrete Mathematics
Text
Wolfram Research (2007), ExpressionTreePlot, Wolfram Language function, https://reference.wolfram.com/language/GraphUtilities/ref/ExpressionTreePlot.html.
CMS
Wolfram Language. 2007. "ExpressionTreePlot." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/GraphUtilities/ref/ExpressionTreePlot.html.
APA
Wolfram Language. (2007). ExpressionTreePlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/GraphUtilities/ref/ExpressionTreePlot.html
BibTeX
@misc{reference.wolfram_2026_expressiontreeplot, author="Wolfram Research", title="{ExpressionTreePlot}", year="2007", howpublished="\url{https://reference.wolfram.com/language/GraphUtilities/ref/ExpressionTreePlot.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_expressiontreeplot, organization={Wolfram Research}, title={ExpressionTreePlot}, year={2007}, url={https://reference.wolfram.com/language/GraphUtilities/ref/ExpressionTreePlot.html}, note=[Accessed: 13-June-2026]}