{trees} is for questions about drawing or constructing tree {diagrams} (for example, family trees).

learn more… | top users | synonyms

2
votes
1answer
74 views

How to create classification taxonomies for Literature Review using Latex?

I have to make a literature review taxonomy for my final thesis, highlighting the salient features of each paper referred, its categories etc. I want to represent this diagrammatically using a ...
8
votes
2answers
484 views

Trees with only leaves in TikZ

Following Roel's answer to How to write a tree with no (visible) root with TikZ? I attempted to visualise my Huffman-Code for "Tennessee", but it didn't turn out as I expected: My MWE: ...
6
votes
1answer
41 views

Horizontally aligned terminal nodes in trees with nice empty nodes using forest

When horizontally aligning terminal nodes in trees using the package forest, I run into problems when I try to use the 'nice empty nodes' option, which makes sure that unlabeled nodes connect (this ...
5
votes
1answer
63 views

Is it possible to draw a tree using standard syntax without overlapping, if graphdrawing is loaded?

It seems that merely loading the graphdrawing library can mess up drawing a tree using the standard TikZ syntax. Is there a way to avoid this unwanted effect? For example: ...
1
vote
1answer
65 views

drawing game trees: forest or qtree? [duplicate]

I hope this question actually is in order since it does not seem to have a "correct" answer: I am about to get into drawing game-theoretic trees and while I am familiar with LaTeX in general, I am ...
3
votes
1answer
44 views

Centering trees

How can I centre a tree, moving it to the middle of the page, whilst keeping \ex. in its normal position? \documentclass[12pt,a4paper]{article} \usepackage{tikz-qtree} ...
3
votes
1answer
45 views

Putting a tree next to another tree

How can I put example tree (a) and example tree (b) next to each other on the page? At the moment, tree (b) appears below tree (a): \documentclass[12pt,a4paper]{article} \usepackage{tikz-qtree} ...
1
vote
2answers
48 views

Trees: adjusting arrows and roofs

How can I ensure that the arrow from $t_2$ curves below "of"? How can I use \qroof{some company}.DP and yet still have the arrow pointing to it? \documentclass[12pt,a4paper]{article} ...
2
votes
2answers
74 views

Fitting an enormous tree on a page

I cannot fit this enormous collection of trees onto a page without the page number being obscured. Can anyone help me? \documentclass[12pt,a4paper]{article} \usepackage{tikz-qtree} ...
2
votes
2answers
124 views

Recursion Tree in LaTeX

How can the following recursion tree be drawn in LaTeX? I have tried using TikZ pictures for this, but I continue to get errors in the code. Please suggest an easier code for the same.
4
votes
1answer
49 views

Odd incompatibility between multi-line forest nodes and tabular

The following MWE compiles just fine: \documentclass{article} \usepackage{forest} \begin{document} %\begin{tabular}{c} \begin{forest} [x\\y, align=center [z] ] \end{forest} ...
5
votes
2answers
135 views

tree and blocks

stackexchange members, I tried to do this but unfortunately I couldn't. It is really simple. I found some codes and tried to get similar picture as mine. and second image is Thank you so for ...
45
votes
3answers
29k views

How can I draw simple trees in LaTeX?

I need to draw a tree, and constantly using dotty and including the PNGs is starting to be a pain. Is there a way to get LaTeX to draw it's own trees that doesn't involve learning an entirely new ...
4
votes
2answers
78 views

Tree diagram got cut off

After compiling the code for a tree diagram, some parts of the right hand side of the tree got cut off. I've already used \centering function but this does not fix the problem.I'm not sure how to ...
5
votes
3answers
624 views

Making mixed trees with and without text-containing nodes

I’m using TikZ to draw linguistic syntax trees where some nodes have textual labels and some nodes don’t. I’d like the branch from a labelless node to continue at the same angle into the right hand ...
4
votes
2answers
982 views

Lining up edges of a tree with TikZ

I'm drawing trees with TikZ and \begin{tikzpicture} \node {$C$} child[missing] child{node {$i$} child[missing] child{node {$j$}} }; \end{tikzpicture} produces edges that don't ...
7
votes
2answers
340 views

Automatic connection of text points in tikz-qtree

I have to draw pictures like the following a lot: I want to use tikz-qtree, since I have a lot of trees and this package simplifies things considerably. Right now I use the following code, since it ...
1
vote
2answers
504 views

Depth-first traversal of a binary tree

How can I achieve the drawing of a depth-first traversal of a binary tree like in this picture ?
15
votes
4answers
8k views

How to control spacing in a TikZ tree?

I want to draw a tree and I don't know how to enforce the spacing between them. Some are overlapping. This is my code: \begin{tikzpicture} \tikzstyle{every node}=[circle,draw] \node {A} child { node ...
4
votes
2answers
399 views

How to generate labels next to junctions and avoid self-collision with tikz?

I have an ASCII-art phylogenetic tree that looks (in part) like /------ PLN /-----+ 0.9 | \------ IL1 /--------+ 1.8 | | /----- PVD | ...
1
vote
2answers
538 views

Draw a tree with variable node number

I would like to draw a tree in tex that is more like a sketch of a tree: It should contain variable node numbers. Important is, that the dots are contained in the tree drawn. Is that possible with ...
4
votes
2answers
2k views

AVL Trees in TikZ: draw outside of node

I'm trying to draw an AVL tree with TikZ. I got the basic tree structure covered, but I'm not sure how to draw the balance factor outside of the node (see picture below). Any suggestions?
4
votes
2answers
159 views

tikz draw tree with extra column

01, 001 and 0001 are not actually "childs". How do I add K=1,2,3 and K=4 to the left hand column? And I tried really hard to adjust the distance. But this is the best I can do. Thanks. ...
9
votes
4answers
352 views

Problem using macros to define tree substructures

Relatively simple problem: I want to use macros to define substructures of a tree. In the following example for illustration, I want to define some children (left and right) to be used several times ...
3
votes
1answer
76 views

How to draw an unrooted phylogenetic tree?

I have a problem! I want to draw an unrooted phylogenetic tree like this one: (Image taken from commons.wikimedia) I've tried with the package newicktree, but without success! Anyone can help me ...
4
votes
1answer
139 views

Trees and fitting trees underneath them

Questions How can I fit a tree in the blank space under where I have marked Tree 2 in the photo (directly underneath Tree 1, but to the right of \Rightarrow)? How can I caption Tree 1 and Tree 2 ...
6
votes
2answers
193 views

Decision Tree with Labels on Both Sides of Line

I am trying to generate a decision tree similar to this scanned example: Notice that some branches have text on the top as well as the bottom. I have not figured out how to do this. I can get text ...
1
vote
3answers
73 views

Adding Short Lines Across Decision Tree Branch

I am creating decision trees using the 'forest' package and would like to add short lines across a branch to indicate that the decision is sub-optimal. Can this be done in 'forest'? I am attaching a ...
7
votes
2answers
227 views

Adding Triangles to LaTeX Decision Trees

I am using the 'forest' package in LaTeX in order to create decision trees with multiple decisions. I've got it mostly how I want it, except for two things: I'd like the circles at the leaves of the ...
1
vote
1answer
99 views

Drawing node arrows

I'm not sure how the node function works for use in trees such as the one drawn by Gonzalo Medina in this post: Trees and arrows I'd like to be able to create arrows going from different nodes to ...
5
votes
1answer
107 views

Trees and arrows

I need to draw an arrow, using \draw[semithick,->] (t)..controls +(south west:5) and +(south:5) .. (wh);. I want the arrow to connect e3 at the bottom of the following tree to the single e3 ...
1
vote
0answers
15 views

Strikeout and qtree [duplicate]

I cannot get strikeout to apply inside a tikzpicture. In the example below, strikeout only applies to"Hello World" at the beginning, but not in the tree. How can I solve this problem? ...
1
vote
1answer
52 views

Extending the branches of a tree with binary branches

In the following tree, how can I introduce further and further binary branches between S and VP? \documentclass[12pt,a4paper]{article} \usepackage{tikz-qtree} \usepackage{tikz-qtree-compat} ...
1
vote
1answer
48 views

Fitting items next to trees on the page

I want to be able to put items to the left or right of the tree structure in the following example. How can I do that? At the moment each tree occupies a line. \documentclass[12pt,a4paper]{article} ...
2
votes
3answers
51 views

Positioning of trees

Consider \documentclass[12pt,a4paper]{article} \usepackage{tikz-qtree} \usepackage{tikz-qtree-compat} \begin{document} X + Y $\Rightarrow$ \begin{tikzpicture} \Tree [.X X Y ] \end{tikzpicture} ...
21
votes
4answers
7k views

Drawing a directory listing a la the tree command in TikZ

Good day everyone - Is there a fast and efficient way to draw directory tree structures (aka depth-indented listings) like the unix's tree command, that is, is there a way to draw the following using ...
28
votes
3answers
3k views

How can I improve this family tree in TikZ?

To answer a question about how to draw family tree on LaTeX-Community.org, I created an example: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} ...
9
votes
2answers
3k views

Probability Tree-diagram with TikZ

Thanks for helping me out. How can I make the following tree-diagrams? http://www.vias.org/tmdatanaleng/cc_prob_cond_independ.html
17
votes
5answers
1k views

Typesetting genealogical trees

I looking for a simple way to typeset a genealogical tree in LaTeX. In particular, I'm interested in typesetting a so-called "Ahnentafel", that is a tree that shows me, my parents, my grandparents, ...
2
votes
1answer
123 views

Drawing a tree diagram

How do I draw the tree diagram below in Latex? I also want to label the branches the way they are in the figure. Here's my preamble: \documentclass[11pt,reqno]{amsart} % Packages ...
2
votes
1answer
94 views

Family Tree gone “wrong”

Trying to make a simple tree, but when I finished I realized I'd gone about it totally the wrong way... Would appreciate some help trying to make this the "correct" way. Oh, and also to circle the ...
2
votes
2answers
122 views

Drawing graph decomposition as a tree

Let's say I have a triangle like this which is easily generated by pgf. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ vertex/.style={circle, draw=blue!60, ...
7
votes
1answer
235 views

How to create a correctly aligned tree proof in logic with 4 branches, columns of line numbers and justifications?

I'm looking for a way to make a Logic Tree with three columns (line number, tree itself and commentary). I've tried using a tikz matrix, and it worked very well, except when I get more than two ...
13
votes
3answers
5k views

How do I draw a B+ tree in latex?

Is there some way to draw a B+ tree in latex? It would look something like the picture below (ignoring the animations) Animation linked here: http://i.stack.imgur.com/JRcmY.gif Screenshot of the ...
1
vote
2answers
87 views

Dependency tree graph with extra arrows

I built the tree (black components) using the Stanford Parser. However, it doesn't make its graphs exportable, so I had to take a screenshot. Then to that graph I had to add the two new colorful rows ...
1
vote
1answer
67 views

implement a tree that will fit on two column page structure and permit multiline nodes

I have a paper formatted like this one, i.e. two columns of text per page. I've been trying to make a tree structure to fit inside of one column, but so far I've been unable to make it work. There ...
1
vote
2answers
72 views

qtree spacing and alignment

I have the following qtree \begin{center} \Tree[.{\tiny \ttfamily \itseries educated at}{\tiny \ttfamily ( Bush, University of Texas at Austin)} [. [. ...
1
vote
0answers
24 views

What am I doing wrong with the qtree function? [duplicate]

I have been trying to figure out what is wrong with my code, but no matter what I do it does not compile. \documentclass[12pt]{report} \usepackage{tikz-qtree, qtree, graphicx} ...
9
votes
4answers
486 views

Upside-down syntax trees for linguistics with horizontal lines

I know that syntax analysis can be done in Latex using using TikZ, but the tree-structure that produces isn't really used in my country. Here, we mostly use straight lines instead of hierarchy trees. ...
6
votes
4answers
205 views

How to use Tikz and macros to very efficiently draw recombining binomial trees when taking notes during class

For a class in derivatives pricing I would like to find a way to quickly and efficiently draw recombining binomial trees. The class involved quite a few of those trees and it would be immensely ...