Making a plot of a tree structure
- To: mathgroup at smc.vnet.net
- Subject: [mg17322] Making a plot of a tree structure
- From: "Philip M. Howe" <pmhowe at lanl.gov>
- Date: Fri, 30 Apr 1999 23:22:39 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Hello, Suppose that I have a list such as "mylist" mylist={{0,0},{.04,.06},{.22,.15},{.5,.5},{.04,.06},{.35,.38},{.51,.82},{.22,.15 },{.15,.3}}; My code parcel that generates lists of this type actually produces a very highly nested list. I have used Flatten and Partition to generate the list of x-y pairs shown above. Conceptually,this simple list actually started as a list of three lists, one with its origin at {0,0}, one with its origin {.04,.06}, which is a point on the first list, and one with its origin {.22,.15}, which is also a point on the first list. If I use Show[Graphics[Line[mylist]]]; the plot actually forms loops. I would rather have it look like a tree, or a walk with two other walks branching from it. (I would get that, for example, if I broke "mylist" into three separate lists, "list1", "list2", "list3", and applied "Line" to each, and then used show. e.g., list1={{0,0},{.04,.06},{.22,.15},{.5,.5}}; list2={{.04,.06},{.35,.38},{.51,.82}}; list3={{.22,.15},{.15,.3}}; Show[Graphics[{Line[list1],Line[list2],Line[list3]}]];) However, for a very large list, that would be tedious. Can you suggest an efficient procedure? Thanks in advance for your help.