# Tagged Questions

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

222 views

### Maps between rooted trees using forest (and TiKz)

I had to draw rooted (upward oriented) trees (with leaves). I found the package forest useful, although most likely the work-arounds I employed are not really optimal in any proper sense. An example ...
421 views

### Draw a tree with tikz

I have some problems I am not able to fix with this tree in tikz: 1. how can I avoid the empty space near the root? 2. how can I write a text on branches? I used "edge from parent" but does not work ...
28 views

### How to create a horizontal tree using braces [duplicate]

I want to create a horizontal tree-like structure using braces, as in: Please forgive my lack of creativity. I tried using an equation, for example \begin{equation*} \text{Animals} \left\{ \begin{...
717 views

### How can I draw a circle around an entire tree in forest?

For some reason that I cannot discern, using tikz={\node [draw,circle,fit to tree]{};} to draw a circle around nodes in a tree works as expected if the nodes are embedded in a larger tree. However, ...
238 views

### How to combine a top-down and bottom-up binary tree in one picture?

I want to draw a binary tree like the one in the picture below. Unfortunately, I do not have any clue, whatsoever, on how to draw two trees from top and bottom to match their leaves. Any help would be ...
178 views

### TikZ-style tree nodes with paragraphs?

This may seem like a strange question, but is it possible to create tree edges connecting paragraphs? I've seen examples of TikZ being able to create trees with images and text nodes, but I'm not sure ...
313 views

### Strange graph in tikz

I want to make a strange graph in tikz. This graph has some nodes inside the nodes... like this figure: I tried this: \newcommand{\twonodes}[2]{% \begin{tikzpicture}[node distance=0.7cm] ...
220 views

### Split nodes' label between multiple lines in pstricks tree

With pst-node and pst-tree, is it possible to display node's label on multiple lines? With TikZ, it is very easy, you simply put a line break at the appropriate place in the node's label { first line ...
300 views

### auto adjust node position in a binary tree

I'm trying to draw a binary tree using tikz. I use shift option to define the relative position of child nodes. But as the tree grows, the nodes start to overlap if I use a fixed shift. I'm able to ...
129 views

### list/tree with arrows from main word

Can anybody help me to do something like this in LaTeX? Thank you!
68 views

### Why am I having this problem with exam class and the package newicktree?

I'm having trouble getting phylogenetic trees to display correctly within the solution environment of the exam class. For some reason, they are positioned way far to the right (running off the page) ...
627 views

### Latex Binomial tree (space and overlapping)

I encounter the following problem: I want to fit a (vertical) binomial tree but the siblings from the third level overlap (no matter how I adjust the distances they either overlap with each other or ...
427 views

### How to draw phylogenetic tree? [closed]

I'm using Mac OSX Mavericks and have downloaded LaTex. I am currently learning how to draw phylogenetic tree. Can someone teach me? I have copied a sample of code for the phylogenetic tree. it uses ...
160 views

### Typesetting Dependency Grammar trees with discontinuous constituents

I managed to typeset simple Dependency Grammar trees (Typesetting Dependency Grammar trees), but now want to have non projective graphs. The solution with forest is the following: \documentclass{...
345 views

### Typesetting Dependency Grammar trees

I try to typeset dependency trees: Is there a package that does this? It should be compatible with xelatex, i.e. not be based on pstricks. I could not find anything with google or on CTAN. If ...
9k views

### Drawing binary trees with LaTeX labels

Is there some good tool for drawing binary trees with labels that are rendered by latex? I would need to have the tree node placement done automatically for me, because there are too many labels to ...
945 views

### How to Create Directed Graphs in LaTeX

How can one create a tree structure in LaTeX that begins with a single number and extends with an arbitrary number of arrows that connect numbers below with numbers above such that the head faces ...
455 views

### Tikz/Forest: highlighting level background

I am using the Forest package and I am trying to paint a gray background for odd and even rows, as well as a label. I already had a version of this diagram that I wrote "manually" with tikz. But it ...
212 views

### Forest: four edges to one edge path

How to make four edges to one edge path? I have made ​​it up here: \documentclass[10pt,a4paper]{article} \usepackage[margin=2cm]{geometry} \usepackage{charter} \usepackage{forest} \...
679 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: \...
266 views

### representing a null child in a binary tree using ground symbol

I'm using ground symbol to represent a null child in a binary tree. But the ground symbol has arrows in it. How do I remove them? \documentclass{llncs} \usepackage{llncsdoc} \usepackage{tikz} \...
7k views

### Draw a binary tree using tikz

I'm trying to draw a binary tree using tikz package. If I use only circle, I get a tree. But I want to represent a subtree using a triangle. Now the tree gets uneven. I want to attach the arrows to ...
393 views

### TikZ: Re-arranging the hierarchical diagram

I was quite impressed by the solution given by "cfr" for the question posted here. Can you suggest a method to change the two main children (labelled Projection matrix Theory and Reconstruction ...
343 views

### Add a node without content to a tree in forest

I switched to forest and now I wonder how to draw the following picture: I have the code below, but I cannot find out how to get the connection to dass right. I tried phantom nodes but then the ...
298 views

### Forest package: Left-align all nodes on every level

The tree below looks exactly the way it should. But is a more elegant way to left align all nodes on every level without explicitly specifying tier on every node? This is error-prone and really ...
2k views

### Horizontal Probability Tree with Level Labels

I'm trying to create a Horizontal Probability Tree with Level Labels using tikz. (Not tikz-qtree). Right now, I have a horizontal tree. The labels are NOT aligned to the top of the diagram. I would ...
92 views

### Trees with nodes consisting of multiple lines [duplicate]

I want to draw a tree but I want the nodes to be able to have multiple lines and specific width. I have searched about trees but all of them consist of a single line in each node. From what I have ...
532 views

### Tree with six or more children

I'm using qtree and a tree with five children works perfectly: \documentclass{standalone} \usepackage{qtree} \begin{document} \Tree[.n 1 2 3 4 5 ] \end{document} But when I add another node: \...
3k 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, ...
261 views

### Specifying the depth of a binary tree on the side

I'm trying to draw a tree, and I want to specify its depth along the side with a double headed arrow with the depth written on the arrow. Here is what I have so far: \begin{tikzpicture}[<-, >=...
292 views

### Prune a branch in a tree

I would like to prune (for indication) some branches of this minimax tree. I'd like to have a cross line over each branch that would be pruned in the final tree. I cannot seem to be able to do it with ...
2k views

### Drawing Flow Chart with LaTeX

TikZ can draw flow chart but I want some sort of a graphical tool where I can create flowchart in an interactive way and then somehow export to LaTeX. Any advice? I am not a geek and the interface ...
701 views

### Using tikz overlay / remember picture option with forest trees

I want to connect two forest trees with an arrow, in a similar way it is discussed here for plain tikz trees. However, it seems to be impossible to add options to the forest environment in a similar ...
284 views

### Regular Expression AST with forest or qtree

I would like to represent an abstract syntax tree over a regular expression. Preferable in the form of the following tree: <regexp> | ...
348 views

### Understanding forest options when customising trees

This is a follow-up to Gonzalo Medina's answer to this question. The solution offered there includes the following code at the start of the forest environment: edge path={ \noexpand\path[\...
630 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. ...
594 views

### How do I draw merged red black tree into 2,3,4 tree in tikz?

I'm using tikz in study material and I want to show analogy between RB trees and B-trees (2,3,4 tree). I want my output looks something like this example from Wikipedia. For RB tree I'm using almost ...
477 views

### Unbalanced binary tree with forest

How can one draw an unbalanced binary tree - with missing nodes using the forest package?
350 views

### How to add curly brace below xytree nodes

I would like to add a curly brace and label underneath the E and F nodes of an xytree like this: So far, I have the code for the tree, but haven't been able to figure out how to insert the curly ...
512 views

### Straight and non-straight parent-child connections in tikz-qtree

I want to acheive something of this sort, (without the bounding boxes): Here, the first child has a straight line from the parent, and the following ones are diagonal. What tikzset settings will ...
386 views

### How do I make trees with straight skeletons or spines?

I'm a new/beginner LaTeX user, and I would like to make syntactic trees with straight spines, somewhat like the ones here: http://tanvirdhaka.blogspot.com/2010/01/phrase-structure-grammar.html Or ...
378 views

### How do I make an unbalanced binary tree that branches off to the right?

An image of what I want: For those who are interested: This particular figure is taken from this article (I couldn't find a freely available version) and shows k-buckets (the squares) covering an ...
531 views

### Problem with probability tree

I am trying to make in LaTeX this probability tree: I tried using the tikz package but I keep having some issues. This is the best I got so far (link: https://www.writelatex.com/855538qcgkps#/...
145 views

### store duplicated qtree subtrees for convenience

I am making a tree that reflects a number of different sequential choices. The lower parts of the tree will be repeated, so I'd like to store them in some shorter definition earlier on to make it ...
1k views

### How can I create this game-tree in Latex?

I have the following figure: As of now I create this in Word/Powerpoint and paste the screenshot in a LaTeX file. Is there a way to create this natively? Also, what would be the advantage of doing ...
76 views

### Trees have a huge gap before and after [closed]

I am trying to print out a tree by using following packages: \usepackage{epic} % required by ecltree and fancybox packages \usepackage{ecltree} % to draw the GP trees \usepackage{fancybox} % ...
49 views

### How to draw a tree with fixed node distances? [duplicate]

I am trying to build on the filesystem tree example. I have a similar requirement to display a hierarchical tree, but I'm struggling to get the tree layout right. In the example, the link between a ...
341 views

### How can I coerce TikZ trees to have directed edges? [duplicate]

Consider the following \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \node{A} [grow=east] child {node{B} child {node{C}}}; \end{tikzpicture} \end{document} which ...