| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
|---|
| 2 | <HTML> |
|---|
| 3 | <HEAD> |
|---|
| 4 | <TITLE>drawtree</TITLE> |
|---|
| 5 | <META NAME="description" CONTENT="drawtree"> |
|---|
| 6 | <META NAME="keywords" CONTENT="drawtree"> |
|---|
| 7 | <META NAME="resource-type" CONTENT="document"> |
|---|
| 8 | <META NAME="distribution" CONTENT="global"> |
|---|
| 9 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
|---|
| 10 | </HEAD> |
|---|
| 11 | <BODY BGCOLOR="#ccffff"> |
|---|
| 12 | <DIV ALIGN=RIGHT> |
|---|
| 13 | version 3.6 |
|---|
| 14 | </DIV> |
|---|
| 15 | <P> |
|---|
| 16 | <DIV ALIGN=CENTER> |
|---|
| 17 | <H1>DRAWTREE</H1> |
|---|
| 18 | </DIV> |
|---|
| 19 | <P> |
|---|
| 20 | © Copyright 1990-2002 by The University of |
|---|
| 21 | Washington. Written by Joseph Felsenstein. Permission is granted to copy |
|---|
| 22 | this document provided that no fee is charged for it and that this copyright |
|---|
| 23 | notice is not removed. |
|---|
| 24 | <P> |
|---|
| 25 | DRAWTREE interactively plots an unrooted tree diagram, with many options |
|---|
| 26 | including orientation of tree and branches, label sizes and angles, margin |
|---|
| 27 | sizes. Particularly if you can use your computer screen to |
|---|
| 28 | preview the plot, you can very effectively adjust the details of the plotting |
|---|
| 29 | to get just the kind of plot you want. |
|---|
| 30 | <P> |
|---|
| 31 | To understand the working of DRAWGRAM and DRAWTREE, you should first |
|---|
| 32 | read the <A HREF="draw.html">Tree Drawing Programs web page</A> |
|---|
| 33 | in this documentation. |
|---|
| 34 | <P> |
|---|
| 35 | As with DRAWGRAM, to run DRAWTREE you need a compiled copy of the |
|---|
| 36 | program, a font file, and a tree file. The tree file has a default name |
|---|
| 37 | of <TT>intree</TT>. The font file has a default name of "fontfile". If there is |
|---|
| 38 | no file of that name, the program will ask you for the name of a font file |
|---|
| 39 | (we provide ones that have the names <TT>font1</TT> through <TT>font6</TT>). |
|---|
| 40 | Once you decide on a favorite one of these, you could make a copy of it |
|---|
| 41 | and call it <TT>fontfile</TT>, and it will then be used by default. |
|---|
| 42 | Note that the program will get confused if the input tree file has the number |
|---|
| 43 | of trees on the first line of the file, so that numbr may have to be removed. |
|---|
| 44 | <P> |
|---|
| 45 | Once these choices have been made you will see the central menu of the |
|---|
| 46 | program, which looks like this: |
|---|
| 47 | <P> |
|---|
| 48 | <TABLE><TR><TD BGCOLOR=white> |
|---|
| 49 | <PRE> |
|---|
| 50 | |
|---|
| 51 | Unrooted tree plotting program version 3.6a3 |
|---|
| 52 | |
|---|
| 53 | Here are the settings: |
|---|
| 54 | |
|---|
| 55 | 0 Screen type (IBM PC, ANSI)? (none) |
|---|
| 56 | P Final plotting device: Postscript printer |
|---|
| 57 | V Previewing device: X Windows display |
|---|
| 58 | B Use branch lengths: Yes |
|---|
| 59 | L Angle of labels: branch points to Middle of label |
|---|
| 60 | R Rotation of tree: 90.0 |
|---|
| 61 | A Angle of arc for tree: 360.0 |
|---|
| 62 | I Iterate to improve tree: Equal-Daylight algorithm |
|---|
| 63 | D Try to avoid label overlap? No |
|---|
| 64 | S Scale of branch length: Automatically rescaled |
|---|
| 65 | C Relative character height: 0.3333 |
|---|
| 66 | F Font: Times-Roman |
|---|
| 67 | M Horizontal margins: 1.65 cm |
|---|
| 68 | M Vertical margins: 2.16 cm |
|---|
| 69 | # Page size submenu: one page per tree |
|---|
| 70 | |
|---|
| 71 | Y to accept these or type the letter for one to change |
|---|
| 72 | </PRE> |
|---|
| 73 | </TD></TR></TABLE> |
|---|
| 74 | <P> |
|---|
| 75 | These are the settings that control the appearance of the tree, which |
|---|
| 76 | has already been read in. You can either accept these as is, in which |
|---|
| 77 | case you would answer Y to the question and press the Return or Enter |
|---|
| 78 | key, or you can answer N if you want to change one, or simply type the |
|---|
| 79 | character corresponding to the one you want to change (if you answer N it |
|---|
| 80 | will just immediately ask you for that number anyway). |
|---|
| 81 | <P> |
|---|
| 82 | For a first run, particularly if previewing is available, you might accept |
|---|
| 83 | these default values and see what the result looks like. The program |
|---|
| 84 | will then tell you it is about to preview the tree and ask you to press |
|---|
| 85 | Return or Enter when you are ready to see this (you will probably have |
|---|
| 86 | to press it twice). If you are on a Windows system (and have its graphics |
|---|
| 87 | selected as your previewing option), on a Unix or Linux system and are |
|---|
| 88 | using X windows for previewing, or are on a Macintosh system, a new |
|---|
| 89 | window will open with the preview in it. If you are using the Tektronix |
|---|
| 90 | preview option the preview will appear in the window where the menu was. |
|---|
| 91 | <P> |
|---|
| 92 | On X Windows, Macintosh, and Windows you can resize the preview window, |
|---|
| 93 | though for some of these you may have to ask the system to redraw the |
|---|
| 94 | preview to see it at the new window size. |
|---|
| 95 | <P> |
|---|
| 96 | Once you are finished looking at the preview, you will want to |
|---|
| 97 | specify whether the program should make the final plot or change some of |
|---|
| 98 | the settings. This is done differently on the different previews: |
|---|
| 99 | <P> |
|---|
| 100 | <UL> |
|---|
| 101 | <LI>In <B>X Windows</B> you should make the menu window the active |
|---|
| 102 | window. You may need to move the mouse over it, or click in it, or |
|---|
| 103 | click on its top bar. You do not need to try to close the preview |
|---|
| 104 | window yourself, and usually if you do this will cause trouble. |
|---|
| 105 | <LI>In <B>Windows</B> use the <TT>File</TT> menu in the preview window |
|---|
| 106 | and choose either the <TT>Change Parameters</TT> menu item, or if |
|---|
| 107 | you are ready to make the final plot, choose the <TT>Plot</TT> menu item. |
|---|
| 108 | <LI>On a <B>Macintosh</B> system, you can simply use the little box in |
|---|
| 109 | the corner of the preview window to close it. The text window for the |
|---|
| 110 | menu will then be active. |
|---|
| 111 | <LI>In <B>PC graphics</B> press on the Enter key. The screen with the |
|---|
| 112 | preview should disappear and the settings menu reappear. |
|---|
| 113 | <LI>With a <B>Tektronix</B> preview, you may need to change your screen |
|---|
| 114 | from a Tektronix-compatible mode to see the menu again. |
|---|
| 115 | </UL> |
|---|
| 116 | <P> |
|---|
| 117 | Except with the Macintosh preview, the program will |
|---|
| 118 | now ask you if the tree is now ready to be plotted. If you answer Y (for |
|---|
| 119 | Yes) (or choose this option in the <TT>File</TT> menu of the preview |
|---|
| 120 | window in the case of Windows) the program will usually write a plot file |
|---|
| 121 | (with some plot options it will draw the tree on the screen). Then it will |
|---|
| 122 | terminate. |
|---|
| 123 | <P> |
|---|
| 124 | But if you do not say that you are ready to plot the tree, |
|---|
| 125 | it will go back to the above menu, allow |
|---|
| 126 | you to change more options, and go through the whole process again. The |
|---|
| 127 | easiest way to learn the meaning of the options is to try them, |
|---|
| 128 | particularly if previewing is available. Below I will describe them one |
|---|
| 129 | by one; you may prefer to skip reading this unless you are puzzled about |
|---|
| 130 | one of them. |
|---|
| 131 | <P> |
|---|
| 132 | <H2>THE OPTIONS</H2> |
|---|
| 133 | <P> |
|---|
| 134 | <DL COMPACT> |
|---|
| 135 | <DT>O</DT> <DD>This is an option that allows you to change the menu window |
|---|
| 136 | to be an ANSI terminal or an IBM PC terminal. Generally you will not |
|---|
| 137 | want to change this.</DD> |
|---|
| 138 | <P> |
|---|
| 139 | <DT>P</DT> <DD>This allows you to choose the Plotting device or file |
|---|
| 140 | format. We have discussed the possible choices in the |
|---|
| 141 | <A HREF="draw.html">draw programs documentation web page</A>.</DD> |
|---|
| 142 | <P> |
|---|
| 143 | <DT>V</DT> <DD>This allows you to change the type of preView window (or |
|---|
| 144 | even turn off previewing. We have discussed the different possible |
|---|
| 145 | choices in the <A HREF="draw.html">draw programs documentation web page</A>.</DD> |
|---|
| 146 | <P> |
|---|
| 147 | <DT>B</DT> <DD>Whether the tree has Branch lengths that are |
|---|
| 148 | being used in the diagram. If the tree that was read in had a full set |
|---|
| 149 | of branch lengths, it will be assumed as a default that you want to use |
|---|
| 150 | them in the diagram, but you can specify that they are not to be used. If |
|---|
| 151 | the tree does not have a full set of branch lengths then this will |
|---|
| 152 | be indicated, and if you try to use branch lengths the program will |
|---|
| 153 | refuse to allow you to do so.</DD> |
|---|
| 154 | <P> |
|---|
| 155 | <DT>L</DT> <DD>The angle of the Labels. Initially the branches connected to |
|---|
| 156 | the tips will point to the middles of the labels. |
|---|
| 157 | If you want to change the way the labels are drawn, the program |
|---|
| 158 | will offer you a choice between Fixed, Middle, Radial, and Along as the |
|---|
| 159 | ways the angles of the labels are to be determined. If you choose |
|---|
| 160 | Fixed (the default), you will be asked if you want labels to be at some fixed |
|---|
| 161 | angle, between 90.0 and |
|---|
| 162 | -90.0 degrees, you can specify that. You may have to try different angles |
|---|
| 163 | to find one that keeps the |
|---|
| 164 | labels from colliding: I have not guarded against this. However there |
|---|
| 165 | are additional options. |
|---|
| 166 | The other systems for determining angles of labels are Middle (M), Radial (R) |
|---|
| 167 | and Along (A). Middle has the branch connected to that tip |
|---|
| 168 | point to the midpoint of the label. |
|---|
| 169 | Radial indicates that the labels are all aligned to as to |
|---|
| 170 | point toward the root node of the tree. Along aligns them to have the |
|---|
| 171 | same angle as the branch connected to that tip. This is particularly |
|---|
| 172 | likely to keep the labels from colliding, but it may give a misleading |
|---|
| 173 | impression that the final branch is long. Note that with the Radial |
|---|
| 174 | option, if you do not like the point from which the labels appear to |
|---|
| 175 | radiate, you might try re-rooting the tree (option 7).</DD> |
|---|
| 176 | <P> |
|---|
| 177 | <DT>R</DT> <DD>The rotation of the tree. This is |
|---|
| 178 | initially 90.0 degrees. The angle is read out counterclockwise from the |
|---|
| 179 | right side of the tree, so that increasing this angle will rotate the |
|---|
| 180 | tree counterclockwise, and decreasing it will rotate it clockwise. |
|---|
| 181 | The meaning of this angle is explained further under option A. |
|---|
| 182 | As you rotate the tree, the appearance (and size) may change, but the |
|---|
| 183 | labels will not rotate if they are drawn at a Fixed angle.</DD> |
|---|
| 184 | <P> |
|---|
| 185 | <DT>A</DT> <DD>The Angle through which the tree is plotted. |
|---|
| 186 | This is by default 360.0 degrees. The tree is in the shape of an |
|---|
| 187 | old-fashioned hand fan. The tree fans out from its root node, each of |
|---|
| 188 | the subtrees being allocated part of this angle, a part proportional to |
|---|
| 189 | how many tips the subtree contains. If the rotation of the tree is (say) |
|---|
| 190 | 90.0 degrees (the default under option R), the fan starts at +270 |
|---|
| 191 | degrees and runs clockwise around to -90 degrees (i.e., it starts at the |
|---|
| 192 | bottom of the plot and runs clockwise around until it returns to the |
|---|
| 193 | bottom. Thus the center of the fan runs from the root upwards (which is |
|---|
| 194 | why we say it is rotated to 90.0 degrees). By changing option R we can |
|---|
| 195 | change the direction of the fan, and by changing option A we can change |
|---|
| 196 | the width of the fan without changing its center line. If you want the |
|---|
| 197 | tree to fan out in a semicircle, a value of a bit greater than 180 |
|---|
| 198 | degrees would be appropriate, as the tree will not completely fill the |
|---|
| 199 | fan. Note that using either of the iterative improvement methods |
|---|
| 200 | mentioned below is impossible if the angle is not 360 degrees.</DD> |
|---|
| 201 | <P> |
|---|
| 202 | <DT>I</DT> <DD>Whether the tree angles will be Iteratively |
|---|
| 203 | improved. There are three methods available: |
|---|
| 204 | <P> |
|---|
| 205 | <DL> |
|---|
| 206 | <DT>Equal Arc</DT> <DD>This method, invented by Christopher Meacham in |
|---|
| 207 | PLOTREE, the predecessor to this program, starts from the root of the tree |
|---|
| 208 | and allocates arcs of angle to each subtree proportional to the number of |
|---|
| 209 | tips in it. This continues as one moves out to other nodes of the tree and |
|---|
| 210 | subdivides the angle allocated to them into angles for each of that node's |
|---|
| 211 | dependent subtrees. This method is fast, and never results in lines of the |
|---|
| 212 | tree crossing. It is the method used to make a starting tree for the other |
|---|
| 213 | two methods.</DD> |
|---|
| 214 | <P> |
|---|
| 215 | <DT>Equal Daylight</DT> <DD>This iteratively improves an initial tree by |
|---|
| 216 | successively going to each interior node, looking at the subtrees (often |
|---|
| 217 | there are 3 of them) visible from there, and swinging them so that the |
|---|
| 218 | arcs of "daylight" visible between them are equal. This is not as fast as |
|---|
| 219 | Equal Arc but should never result in lines crossing. It gives particularly |
|---|
| 220 | good-looking trees, and it is the default method for this program. It will |
|---|
| 221 | be described in a future paper by me. This method has also been licensed to |
|---|
| 222 | David Swofford for use in his program <TT>PAUP*</TT></DD> |
|---|
| 223 | <P> |
|---|
| 224 | <DT>N-Body</DT> <DD>This assumes that there are electrical charges located |
|---|
| 225 | at the ends of all the branches, and that they repel each other with a force |
|---|
| 226 | that varies (as electrical repulsion would) as the inverse square of the |
|---|
| 227 | distance between them. The tree adjusts its shape until the forces balance. |
|---|
| 228 | This can be computationally slow, and can result in lines crossing. I find |
|---|
| 229 | the trees inferior to Equal Daylight, but it is worth a try.</DD> |
|---|
| 230 | </DL> |
|---|
| 231 | <P> |
|---|
| 232 | <DT>D</DT> <DD>Whether the program tries to avoiD overlap of the labels. |
|---|
| 233 | We have left this off by default, because it is a rather feeble option |
|---|
| 234 | that is frequently unsuccessful, and often make the trees look wierd. |
|---|
| 235 | Nevertheless it may be worth a try.</DD> |
|---|
| 236 | <P> |
|---|
| 237 | <DT>S</DT> <DD>On what Scale the branch lengths will be translated |
|---|
| 238 | into distances on the output device. Note that when branch lengths |
|---|
| 239 | have not been provided, there are implicit branch lengths of 1.0 per |
|---|
| 240 | branch. This option will toggle back and forth between automatic |
|---|
| 241 | adjustment of branch lengths so that the diagram will just fit into the |
|---|
| 242 | margins, and you specifying how many centimeters there will be per unit |
|---|
| 243 | branch length. This is included so that you can plot different trees |
|---|
| 244 | to a common scale, showing which ones have longer or shorter branches than |
|---|
| 245 | others. Note that if you choose too large a value for centimeters per |
|---|
| 246 | unit branch length, the tree will be so big it will overrun the plotting |
|---|
| 247 | area and may cause failure of the diagram to display properly. Too small |
|---|
| 248 | a value will cause the tree to be a nearly invisible dot.</DD> |
|---|
| 249 | <P> |
|---|
| 250 | <DT>C</DT> <DD>The Character height, measured as a fraction |
|---|
| 251 | of a quantity which is the horizontal space available for the tree, |
|---|
| 252 | divided by one less than the number of tips. You need not worry about |
|---|
| 253 | exactly what this is: you can always change the value (which is |
|---|
| 254 | initially 0.3333) to make the labels larger or smaller. On output devices |
|---|
| 255 | where line thicknesses can be varied, the thickness of the tree lines will |
|---|
| 256 | automatically be adjusted to be proportional to the character height, |
|---|
| 257 | which is an additional reason you may want to change character height.</DD> |
|---|
| 258 | <P> |
|---|
| 259 | <DT>F</DT> <DD>Allows you to select the |
|---|
| 260 | name of the Font that you will use for the species names. This is |
|---|
| 261 | allowed for some of the plotter drivers (this menu item does not |
|---|
| 262 | appear for the others). You can |
|---|
| 263 | select the name of any font that is available for your plotter, for |
|---|
| 264 | example "Courier-Bold" or "Helvetica". The label will then be |
|---|
| 265 | printed using that font rather than being drawn line-by-line as it |
|---|
| 266 | is in the default Hershey font. In the preview of the tree, the |
|---|
| 267 | Hershey font is always used (which means that it may look different from |
|---|
| 268 | the final font). The size of the characters in the species names is |
|---|
| 269 | scaled according to the label heights you have selected in the menu, |
|---|
| 270 | whether plotter fonts or the Hershey font are used. Note that for some |
|---|
| 271 | plotter drivers (particular Xfig and PICT) fonts can be used only if the |
|---|
| 272 | species labels are horizontal or vertical (at angles of 0 degrees or |
|---|
| 273 | 90 degrees).</DD> |
|---|
| 274 | <P> |
|---|
| 275 | <DT>M</DT> <DD>The horizontal and vertical Margins in |
|---|
| 276 | centimeters. You can enter new margins (you must enter new values for |
|---|
| 277 | both horizontal and vertical margins, though these need not be different |
|---|
| 278 | from the old values). For the moment I do not allow you to specify left |
|---|
| 279 | and right margins separately, or top and bottom margins separately. In |
|---|
| 280 | a future release I hope to do so.</DD> |
|---|
| 281 | <P> |
|---|
| 282 | <DT>G</DT> <DD>If iterative improvement is not |
|---|
| 283 | turned on in option I (so that we are employing the Equal Arc method), this |
|---|
| 284 | option appears in the menu. It controls |
|---|
| 285 | whether the angles of lines will be "regularized". |
|---|
| 286 | Regularization is on by default. It takes the angles of the branches |
|---|
| 287 | coming out from each node, and changes them so that they are "rounded |
|---|
| 288 | off". This process (which I will not fully describe) will make the |
|---|
| 289 | lines vertical if they are close to vertical, horizontal if they are |
|---|
| 290 | close to horizontal, 45 degrees if they are close to that, and so on. |
|---|
| 291 | It will lead to a tree in which angles look very regular. You may or |
|---|
| 292 | may not want that. If you are unhappy with the appearance of the tree |
|---|
| 293 | when using this option, |
|---|
| 294 | you could try rotating it slightly (option R) as that may cause some |
|---|
| 295 | branches to change their angle by a large amount, by having the angles |
|---|
| 296 | be "rounded off" to a different value.</DD> |
|---|
| 297 | <P> |
|---|
| 298 | <DT>#</DT> <DD>The number of pages per tree. Defaults to one, but if |
|---|
| 299 | you need a physically large tree you may want to choose a larger |
|---|
| 300 | number. For example, to make a big tree for a poster, choose a larger |
|---|
| 301 | number of pages horizontally and vertically (the program will ask you |
|---|
| 302 | for these numbers), get out your scissors and paste or tape, and |
|---|
| 303 | go to work.</DD> |
|---|
| 304 | </DL> |
|---|
| 305 | <P> |
|---|
| 306 | I recommend that you try all of these options (particularly if you can |
|---|
| 307 | preview the trees). It is of particular use to try trees with different |
|---|
| 308 | iteration methods (option I) and |
|---|
| 309 | with regularization (option G). |
|---|
| 310 | You will find that variety of effects can be achieved. |
|---|
| 311 | <P> |
|---|
| 312 | I would appreciate suggestions for improvements in DRAWTREE, but please |
|---|
| 313 | be aware that the source code is already very large and I may not be |
|---|
| 314 | able to implement all suggestions. |
|---|
| 315 | </BODY> |
|---|
| 316 | </HTML> |
|---|