Re: Tree plotting package?
- To: mathgroup at smc.vnet.net
- Subject: [mg13337] Re: [mg13233] Tree plotting package?
- From: Robert Pratt <rpratt at math.unc.edu>
- Date: Mon, 20 Jul 1998 02:49:56 -0400
- Sender: owner-wri-mathgroup at wolfram.com
The Combinatorica standard package has what you want.
Needs["DiscreteMath`Combinatorica`"]
?RootedEmbedding
"RootedEmbedding[g, v] constructs a rooted embedding of graph g with
vertex v as the root."
t=FromUnorderedPairs[{{1,2},{1,3},{3,4},{3,5}}];
ShowLabeledGraph[RootedEmbedding[t,1],{x,y,z,a,b}];
Rob Pratt
Department of Mathematics
The University of North Carolina at Chapel Hill CB# 3250, 331 Phillips
Hall
Chapel Hill, NC 27599-3250
rpratt at math.unc.edu
http://www.math.unc.edu/Grads/rpratt/
On Fri, 17 Jul 1998, Sean Cleary wrote:
> Does anyone know if there is an implementation of a Mathematica package
> to draw nice two-dimensional pictures of trees? That is, to go from a
> description of a tree as {x,{y,{z,a,b}}} or somesuch to a plot looking
> like
>
> x
> / \
> y z
> / \
> a b
>
> I was not able to find anything in MathSource. It won't be hard to
> write, it just seemed silly to work on if there is already something
> good available.
>
> Thanks-
>
> Sean Cleary Department of Mathematics Peters Building 359 CSU Fresno
> CA 93740 sean_cleary at csufresno.edu
> http://zimmer.csufresno.edu/~cleary