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

learn more… | top users | synonyms

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 ...
7
votes
1answer
2k views

Tikz Mindmap - how to get more nodes

% Author: Till Tantau % Source: The PGF/TikZ manual \documentclass{article} \usepackage{tikz} \usetikzlibrary{mindmap,trees} \usepackage{verbatim} \begin{document} \pagestyle{empty} \begin{comment} ...
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. ...
37
votes
1answer
21k 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 ...
17
votes
3answers
1k views

TikZ: “skipping” levels when drawing trees

I'm interested in using TikZ to draw rooted trees whose leaves should all be on the same level, pretty much like this: Please don't pay attention to the fancy style and colours, I'm only interested ...
24
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, ...
6
votes
3answers
787 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 ...
4
votes
1answer
839 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 ...
15
votes
5answers
7k views

How to make a 3 level deep tree with tikz

I am busy making a full binary tree of three levels deep. The code I am having now is (using the trees library): \begin{tikzpicture} \node {root} child {node {left} child {node {lleft}} ...
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 ...
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? ...