source: tags/arb-6.0/GDE/PHYLIP/doc/drawtree.html

Last change on this file was 2176, checked in by westram, 20 years ago

* empty log message *

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