source: trunk/GDE/PHYLIP/doc/drawgram.html

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

* empty log message *

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 16.8 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2<HTML>
3<HEAD>
4<TITLE>drawgram</TITLE>
5<META NAME="description" CONTENT="drawgram">
6<META NAME="keywords" CONTENT="drawgram">
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>DRAWGRAM</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>
25DRAWGRAM interactively plots a cladogram- or phenogram-like rooted tree
26diagram, with many options including orientation of tree and branches,
27style of tree, label sizes and angles, tree depth, margin sizes, stem
28lengths, and placement of nodes in the tree.  Particularly if you can
29use your computer to preview the plot, you can very
30effectively adjust the details of the plotting to get just the kind of
31plot you want.
32<P>
33To understand the working of DRAWGRAM and DRAWTREE, you should first
34read the <A HREF="draw.html">Tree Drawing Programs web page</A>
35in this documentation.
36<P>
37As with DRAWTREE, to run DRAWGRAM you need a compiled copy of the
38program, a font file, and a tree file.  The tree file has a default name
39of <TT>intree</TT>.  The font file has a default name of "fontfile".  If there is
40no file of that name, the program will ask you for the name of a font file
41(we provide ones that have the names <TT>font1</TT> through <TT>font6</TT>).
42Once you decide on a favorite one of these, you could make a copy of it
43and call it <TT>fontfile</TT>, and it will then be used by default.
44Note that the program will get confused if the input tree file has the number
45of trees on the first line of the file, so that numbr may have to be removed.
46<P>
47Once these choices have been made you will see the central menu of the
48program, which looks like this:
49<P>
50<TABLE><TR><TD BGCOLOR=white>
51<PRE>
52
53Rooted tree plotting program version 3.6a3
54
55Here are the settings:
56 0  Screen type (IBM PC, ANSI):  (none)
57 P       Final plotting device:  Postscript printer
58 V           Previewing device:  X Windows display
59 H                  Tree grows:  Horizontally
60 S                  Tree style:  Phenogram
61 B          Use branch lengths:  Yes
62 L             Angle of labels:  90.0
63 R      Scale of branch length:  Automatically rescaled
64 D       Depth/Breadth of tree:  0.53
65 T      Stem-length/tree-depth:  0.05
66 C    Character ht / tip space:  0.3333
67 A             Ancestral nodes:  Weighted
68 F                        Font:  Times-Roman
69 M          Horizontal margins:  1.65 cm
70 M            Vertical margins:  2.16 cm
71 #              Pages per tree:  one page per tree
72
73 Y to accept these or type the letter for one to change
74</PRE>
75</TD></TR></TABLE>
76<P>
77These are the settings that control the appearance of the tree, which
78has already been read in.  You can either accept these as is, in which
79case you would answer Y to the question and press the Return or Enter
80key, or you can answer N if you want to change one, or simply type the
81character corresponding to the one you want to change (if you answer N it
82will just immediately ask you for that number anyway).
83<P>
84For a first run, particularly if previewing is available, you might accept
85these default values and see what the result looks like.  The program
86will then tell you it is about to preview the tree and ask you to press
87Return or Enter when you are ready to see this (you will probably have
88to press it twice).  If you are on a Windows system (and have its graphics
89selected as your previewing option), on a Unix or Linux system and are
90using X windows for previewing, or are on a Macintosh system, a new
91window will open with the preview in it.  If you are using the Tektronix
92preview option the preview will appear in the window where the menu was.
93<P>
94On X Windows, Macintosh, and Windows you can resize the preview window,
95though for some of these you may have to ask the system to redraw the
96preview to see it at the new window size.
97<P>
98Once you are finished looking at the preview, you will want to
99specify whether the program should make the final plot or change some of
100the settings.  This is done differently on the different previews:
101<P>
102<UL>
103<LI>In <B>X Windows</B> you should make the menu window the active
104window.  You may need to move the mouse over it, or click in it, or
105click on its top bar.  You do not need to try to close the preview
106window yourself, and usually if you do this will cause trouble.
107<LI>In <B>Windows</B> use the <TT>File</TT> menu in the preview window
108and choose either the <TT>Change Parameters</TT> menu item, or if
109you are ready to make the final plot, choose the <TT>Plot</TT> menu item.
110<LI>On a <B>Macintosh</B> system, you can simply use the little box in
111the corner of the preview window to close it.  The text window for the
112menu will then be active.
113<LI>In <B>PC graphics</B> press on the Enter key.  The screen with the
114preview should disappear and the settings menu reappear.
115<LI>With a <B>Tektronix</B> preview, you may need to change your screen
116from a Tektronix-compatible mode to see the menu again.
117</UL>
118<P>
119Except with the Macintosh preview, the program will
120now ask you if the tree is now ready to be plotted.  If you answer Y (for
121Yes) (or choose this option in the <TT>File</TT> menu of the preview
122window in the case of Windows) the program will usually write a plot file
123(with some plot options it will draw the tree on the screen).  Then it will
124terminate.
125<P>
126But if you do not say that you are ready to plot the tree,
127it will go back to the above menu, allow
128you to change more options, and go through the whole process again.  The
129easiest way to learn the meaning of the options is to try them,
130particularly if previewing is available.  Below I will describe them one
131by one; you may prefer to skip reading this unless you are puzzled about
132one of them.
133<P>
134<H2>THE OPTIONS</H2>
135<P>
136<DL COMPACT>
137<DT>O</DT> <DD>This is an option that allows you to change the menu window
138to be an ANSI terminal or an IBM PC terminal.  Generally you will not
139want to change this.</DD>
140<P>
141<DT>P</DT> <DD>This allows you to choose the Plotting device or file
142format.  We have discussed the possible choices in the
143<A HREF="draw.html">draw programs documentation web page</A>.</DD>
144<P>
145<DT>V</DT> <DD>This allows you to change the type of preView window (or
146even turn off previewing.  We have discussed the different possible
147choices in the <A HREF="draw.html">draw programs documentation web page</A>.</DD>
148<P>
149<DT>H</DT> <DD>Whether the tree grows Horizontally or
150vertically.  The horizontal growth will be from left to right. This
151option is self explanatory.  The other options are designed so that when
152we switch this direction of growth the tree still looks the same, except
153for orientation and overall size.  This option is toggled, that is,
154when it is chosen the orientation changes, going back and forth between
155Vertical and Horizontal.  The default orientation is Horizontal.</DD>
156<P>
157<DT>S</DT> <DD>The Style of the tree.  There are six
158styles possible: Cladogram, Phenogram, Curvogram, Eurogram, Swoopogram,
159and Circular Tree.  These are chosen by the letters C, P, V, E, S and O.
160These take a little explaining.
161<P>
162In spite of the words "cladogram" and "phenogram", there is no
163implication of the extent to which you consider these diagrams as being
164genealogies or phenetic clustering diagrams.  The names refer to pictorial
165style, not your own intended final use for the diagram.  The six styles
166can be described as follows (assuming a vertically growing tree):
167<P>
168<DL>
169<DT>Cladogram</DT> <DD>nodes are connected to other nodes and to tips by straight
170lines going directly from one to the other.  This gives a V-shaped
171appearance.  The default settings if there are no branch lengths are
172designed to yield a V-shaped tree with a 90-degree angle at the base.</DD>
173<P>
174<DT>Phenogram</DT> <DD>nodes are connected to other nodes and to other tips by
175a horizontal and then a vertical line.  This gives a particularly
176precise idea of horizontal levels.</DD>
177<P>
178<DT>Curvogram</DT> <DD>nodes are connected to other nodes and to tips by a curve
179which is one fourth of an ellipse, starting out horizontally and then
180curving upwards to become vertical.  This pattern was suggested by
181Joan Rudd.</DD>
182<P>
183<DT>Eurogram</DT> <DD>so-called because it is a version of cladogram diagram
184popular in Europe.  Nodes are
185connected to other nodes and to tips by a diagonal line that goes outwards
186and goes at most one-third of the way up to the next node, then turns
187sharply straight upwards and is vertical.  Unfortunately it is nearly
188impossible to guarantee, when branch lengths are used, that the angles
189of divergence of lines are the same.</DD>
190<P>
191<DT>Swoopogram</DT> <DD>this option connects two nodes
192or a node and a tip using two curves that are actually each one-quarter
193of an ellipse.  The first part starts out vertical and then bends over
194to become horizontal.  The second part, which is at least two-thirds
195of the total, starts out horizontal and then bends up to become
196vertical.  The effect is that two lineages split apart gradually, then
197more rapidly, then both turn upwards.</DD>
198<P>
199<DT>Circular Tree</DT> <DD>This is a style introduced by David Swofford
200in PAUP*.  The tree grows outward from a central point, being essentially
201a Phenogram style tree in polar coordinates.  The tips form a 360-degree
202circle. The "vertical" lines run outward radially from the center, and the
203"horizontal" lines are arcs of circles centered on it.</DD>
204</DL>
205<P>
206You should experiment with these and decide which you want -- it depends
207very much on the effect you want.</DD>
208<P>         
209<DT>B</DT> <DD>Whether the tree has Branch lengths that are
210being used in the diagram.  If the tree that was read in had a full set
211of branch lengths, it will be assumed as a default that you want to use
212them in the diagram, but you can specify that they are not to be used.  If
213the tree does not have a full set of branch lengths then this will
214be indicated, and if you try to use branch lengths the program will
215refuse to allow you to do so.  Note that when you change option B, the node
216position option A may change as well.</DD>
217<P>
218<DT>L</DT> <DD>The angle of the Labels.  The angle is always
219calculated relative to a vertical tree; whether the tree is horizontal
220or vertical, if the labels are at an angle of 90 degrees they run
221parallel to direction of tree growth.  The default value is 90
222degrees.  The option allows you to choose any angle from 0 to 90 degrees.</DD>
223<P>
224<DT>R</DT> <DD>How the branch lengths will be translated
225into distances on the output device.  Note that when branch lengths
226have not been provided, there are implicit branch lengths specified
227by the type of tree being drawn.  This
228option will toggle back and forth between automatic
229adjustment of branch lengths so that the diagram will just fit into the
230margins, and you specifying how many centimeters there will be per unit
231branch length.  This is included so that you can plot different trees
232to a common scale, showing which ones have longer or shorter branches than
233others.  Note that if you choose too large a value for centimeters per
234unit branch length, the tree will be so big it will overrun the plotting
235area and may cause failure of the diagram to display properly.  Too small
236a value will cause the tree to be a nearly invisible dot.</DD>
237<P>
238<DT>D</DT> <DD>The ratio between the Depth and the
239breadth of the tree.  It is initially set near 0.5, to approximate a
240V-shaped tree, but you may want to try a larger value to get a longer
241and narrower tree.  Depth and breadth are described as if the tree grew
242vertically, so that depth is always measured from the root to the tips
243(not including the length of the labels).</DD>
244<P>
245<DT>T</DT> <DD>The length of the sTem of the tree
246as a fraction of the depth of the tree.  You may want to either lengthen
247the stem or remove it entirely by giving a value of zero.</DD>
248<P>
249<DT>C</DT> <DD>The Character height, measured as a fraction
250of the tip spacing.  If the labels are rotated to a shallow
251angle, the character height will be automatically adjusted in hopes of
252avoiding collision of labels at different tips.  This option allows you
253to change the size of the labels yourself.  On output devices where
254line thicknesses can be varied, the thickness of the tree lines will
255automatically be adjusted to be proportional to the character height,
256which is an additional reason you may want to change character height.</DD>
257<P>
258<DT>A</DT> <DD>Controls the
259positions of the Ancestral (interior) nodes.  This can greatly affect the
260appearance of the tree.  The vertical positions (these descriptions assume a
261a tree growing vertically) are not under your control except insofar as you
262specify the use or non-use of branch lengths.  If you choose to change
263this option you will see the menu:
264<P>
265<TABLE><TR><TD BGCOLOR=white>
266<PRE>
267Should interior node positions:
268 be Intermediate between their immediate descendants,
269    Weighted average of tip positions
270    Centered among their ultimate descendants
271    iNnermost of immediate descendants
272 or so that tree is V-shaped
273 (type I, W, C, N or V):
274</PRE>
275</TD></TR></TABLE>
276<P>
277The five methods (Intermediate, Weighted, Centered, Innermost, and
278V-shaped) are different horizontal positionings of the interior nodes.
279It will be helpful to you to try these out and see which you like best.
280Intermediate places the node halfway between its immediate descendants
281(horizontally), Weighted places it closer to that descendant who is
282closer vertically as well, and Centered centers the node below the
283horizontal positions of the tips that are descended from that node.  You
284may want to choose that option that prevents lines from crossing each
285other.
286<P>
287V-shaped is another option, one designed, if there are no branch lengths
288being used, to yield a v-shaped tree of regular appearance.  With branch
289lengths it will not necessarily do so.   "Innermost" is the most unusual
290option: it chooses a center for the tree, and always places interior
291nodes below the innermost of their immediate descendants.  This leads
292to a tree that has vertical lines in the center, like a tree with a
293trunk.
294<P>
295If the tree you are plotting has a full set of lengths, then when it is
296read in the node position option is automatically set to "intermediate",
297which is the setting with the least likelihood of lines in the tree
298crossing.  If it does not have lengths the option is set to "V-shaped".
299If you change option B which tells the program whether to try to use
300the branch lengths, then the node position option will automatically be
301reset to the appropriate one of these defaults.  This may be confusing
302if you do not realise that it is happening.</DD>
303<P>
304<DT>F</DT> <DD>Allows you to select the
305name of the Font that you will use for the species names.  This is
306allowed for some of the plotter drivers (this menu item does not
307appear for the others).  You can
308select the name of any font that is available for your plotter, for
309example "Courier-Bold" or "Helvetica".  The label will then be
310printed using that font rather than being drawn line-by-line as it
311is in the default Hershey font.  In the preview of the tree, the
312Hershey font is always used (which means that it may look different from
313the final font).  The size of the characters in the species names is
314scaled according to the label heights you have selected in the menu,
315whether plotter fonts or the Hershey font are used.  Note that for some
316plotter drivers (particular Xfig and PICT) fonts can be used only if the
317species labels are horizontal or vertical (at angles of 0 degrees or
31890 degrees).</DD>
319<P>
320<DT>M</DT> <DD>The horizontal and vertical Margins in
321centimeters.  You can enter new margins (you must enter new values for
322both horizontal and vertical margins, though these need not be different
323from the old values).  For the moment I do not allow you to specify left
324and right margins separately, or top and bottom margins separately.  In
325a future release I hope to do so.</DD>
326<P>
327<DT>#</DT> <DD>The number of pages per tree.  Defaults to one, but if
328you need a physically large tree you may want to choose a larger
329number.  For example, to make a big tree for a poster, choose a larger
330number of pages horizontally and vertically (the program will ask you
331for these numbers), get out your scissors and paste or tape, and
332go to work.</DD>
333</DL>
334<P>
335I recommend that you try all of these options (particularly if you can
336preview the trees).  It is of particular use to try combinations of the
337style of tree (option S) with the different methods of placing
338interior nodes (option A).  You will find that a wide variety of
339effects can be achieved.
340<P>
341I would appreciate suggestions for improvements in DRAWGRAM, but please
342be aware that the source code is already very large and I may not be
343able to implement all suggestions.
344</BODY>
345</HTML>
Note: See TracBrowser for help on using the repository browser.