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

learn more… | top users | synonyms

156
votes
12answers
22k views

How can we draw a Christmas tree with decorations, using TikZ?

I would like to use TikZ for drawing a christmas tree. Here's a start, I used the lindenmayersystems library for drawing a tree: \documentclass{article} \usepackage{tikz} ...
19
votes
3answers
4k 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 ...
10
votes
3answers
2k views

How to draw syntactical trees with parallel leafs for a natural language?

I need to draw syntactical trees for a natural language. The problem is that I need all the leafs to be parallel. How the other nodes are sorted in relation to the other at the same depth is not ...
21
votes
1answer
5k views

Making a (simple) directory tree

I'm trying to make a simple directory tree representation in LaTeX. Something like: spam | +-- ham +-- eggs | +-- more spam +-- dead parrots The tree won't be that long (say, ...
24
votes
1answer
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} ...
5
votes
1answer
503 views

Square edges in forest package

I can easily do trees with horizontal (square) edges in tikz-qtree (see MWE). The forest package is however a far superior alternative for my purposes. However, every attempt to do either horizontal ...
11
votes
2answers
4k 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 ...
9
votes
2answers
4k views

How to draw up a hierarchical tree diagram for taxonomic classification

Please show me the most simple, elegant code for this: How to do it in other words.
20
votes
3answers
3k views

Rounded corners in TikZ trees.

When I use TikZ tree with nodes with rounded corners, the connecting lines do not touch the nodes (near corners) but end where would rectangle end. Is there an easy way around it? ...
14
votes
4answers
3k views

How to automatically draw a graph in LaTeX

clarification: when I say "graph", I mean the computer science term. I want to draw a full binary tree of h height. It means that there's one root with two sons, each son has two sons and so forth. ...
19
votes
2answers
2k views

How to change the level distance in tikz-qtree for one level only?

I am trying to draw a tree for a game theory problem. The problem is that the label p1=0.5 crosses label I. I would like to adjust the level distance of the first level, but the \tikzset{level ...
6
votes
1answer
1k views

I'm getting the error: ! Paragraph ended before \@@label was complete

I've scoured this forum and it looks to me like I'm setting up the tree correctly, but I'm still getting this error, I have \usepackage{tikz} \usepackage{tikz-qtree} in the header. Here is the ...
5
votes
1answer
89 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={ ...
4
votes
1answer
2k 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
36
votes
1answer
19k 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 ...
11
votes
1answer
516 views

Using beamer overlays with forest generated trees

I am using the forest package from Sašo Živanović in order to create a wide tree on a beamer slide. Previously, I was using qtree. But due to the easier way of arranging nodes automatically with ...
14
votes
1answer
393 views

Is it possible to emulate qtree with forest?

This question was actually asked by Alan Munn in a comment to How do I create a LCM tree diagram?. I repeat (and self-answer) it here because the answer is too long to fit the margin :-) qtree is a ...
11
votes
2answers
1k views

How two connect any arbitrary nodes of tree in tikz

I need to be able to connect any arbitrary nodes in a tree to each other. I am using the tree package in tikz to create my tree. I cannot figure out though how to connect to nodes by let say a draw ...
4
votes
2answers
2k views

How to draw a horizontal tree with branches on the right and left?

I need to draw trees but they should extend (from the root) on both sides. TikZ seems a good solution but do not how to manage it.
9
votes
4answers
3k views

beamer & TikZ: gradually unveil trees

Imagine a simple tree: \begin{tikzpicture} \node {Selbstregulation} [edge from parent fork down] child {node {Kognition}} child {node {Metakognition} child {node {Planung}} ...
9
votes
1answer
3k views

Triangle node with adjustable height

I'm trying to draw AVL trees with TikZ, what I need is: Binary tree with simple circle nodes, and adjustable height triangle (or rectangle) nodes for subtrees, both containing only single ...
5
votes
1answer
420 views

How to fix the overlapped nodes with long text, in TikZ. Concept maps

I'd like to get helping from you. I want to have paragraphs in the nodes of the concept map with Tikz, I mean, texts with multiple lines. I have a problem with texts, the nodes are overlapped. Here's ...
4
votes
1answer
120 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 ...
8
votes
3answers
304 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 ...
1
vote
1answer
372 views

Aligning trees built with tikzpicture

I want to align some trees I am creating. I want the root node of all the trees to be on the same line. Currently for each tree I create, the root node of each subsequent tree is on a line after the ...
7
votes
1answer
241 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 ...
7
votes
1answer
1k views

Tikz - Marking nodes in a binary tree?

I need help marking nodes in a binary tree. I've tried drawing this using the fitting library in tikz, but the fit would cover other undesired nodes as well. Please help. The code I tried is here ...
4
votes
1answer
1k views

TikZ-tree: edge-alignment in horizontal org-chart

I'm working on some sort of org-chart/hierarchy-tree and ran into issues with the edge-alignment. As a guideline I used the family-tree-TeXample. See the TeX.sx-dicussion here. However, the text in ...
12
votes
3answers
6k 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 ...
8
votes
1answer
963 views

How to draw a joining line between two picture tikz-pgf

I'am having draw two tree using the tikz-pgf package \begin{frame} \begin{columns}[c] \begin{column}{2cm} \begin{tikzpicture}[scale=0.5] \tikzstyle{level 1}=[sibling distance=10mm] ...
6
votes
1answer
1k views

How to specify left and right node of a tikz-qtree

I'm drawing a binary tree using tikz-qtree. In my binary tree the order of children is important, so I need distinguish which edge is the left one and the right one. In my sample code I can't ...
4
votes
1answer
1k 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
1answer
803 views

Visualizing broad Tikz tree graph

Modules of software I created produce Tikz QTree diagrams for visualisation. The problem is that some trees grow quite broad... Even when I try to massively shrink them by Tikz settings, I cannot ...
9
votes
4answers
239 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, ...
9
votes
1answer
702 views

draw an ellipse into a Tree picture -tikz package

I have draw a tree using tikz package like this \begin{tikzpicture} \tikzstyle{level 1}=[sibling distance=40mm] \tikzstyle{level 2}=[sibling distance=20mm] \tikzstyle{level 3}=[sibling ...
7
votes
1answer
261 views

Draw randomized tree in TikZ

I am trying to draw a randomized tree using TikZ, that is, I'm looking for a macro \randtree{NN}{x} that attaches a randomized tree of maximum depth x to a node named NN. The nodes need not be visible ...
6
votes
1answer
277 views

Customized edge in forest tree

Following the examples in the documentation, it is not too difficult to customize the edge of trees using the tikz-qtree package. The following code illustrates it: \documentclass{standalone} ...
6
votes
3answers
766 views

pstree: How can I force a tree node to one side?

I'm drawing some binary search trees using pstricks and pstree, but I don't see anything in the docs to push a node to one side. In a binary search tree, every child must be either right or left, but ...
5
votes
1answer
429 views

Tree using Latex

I want to to reduce the size of the node to which they perceived better in my presentation; the problem is that the nodes are overlap. I have the code from Drawing a tree where many nodes have the ...
2
votes
2answers
357 views

Describing leaves of a tree with an underbrace using pstree/pstricks

I'd like to have a discription for some of the leaves. It doesn't need to be an underbace, if somebody has better graphical suggestions... :) Consider this example: ...
2
votes
1answer
2k views

Bad math delimiter in tikz tree

I'm trying to diagram an extensive form game using TikZ trees. The following code generates errors at compile time. Specifically, it complains about missing $'s and a bad math delimiter. I've been ...
1
vote
3answers
141 views

How to colorize only one of the three branches in a game tree?

I am using Osborne's egameps package to create a game tree of an extensive game. How could I colorize only the right branch of the tree branch in the first movement as red. I attempted to use ...