{tikz-trees} is for questions addressing issues related to trees in {tikz-pgf}.

learn more… | top users | synonyms

22
votes
2answers
778 views

Why does PGF/TikZ 3.0 draw my simple layered graph as non-planar by default?

I have two questions: If I’m reading §30.4 “Crossing Minimization” of the PGF/TikZ 3.0 manual correctly, the layered graph drawing algorithm should have crossing minimization enabled by default. So ...
20
votes
3answers
5k 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 ...
19
votes
1answer
2k views

Mindmap with Tikz

I created a mindmap according to this example: http://www.texample.net/tikz/examples/computer-science-mindmap/ Sometimes the branches contain too much information so that the map looks ugly like in ...
17
votes
5answers
7k views

drawing tree using tikz, child overlap

I am trying to draw a tree but unfortunately i have some childs overlap each other,I increased the sibling distance , even i have used the option scale but i have the same problem. here is my code : ...
16
votes
2answers
7k views

How do I make an unbalanced binary tree?

How do I draw just a tree with one child using tikzpicture? As shown in the picture, I want to have a tree like (1). But I have only been succesful in getting a picture like (2) and (3) using: ...
16
votes
1answer
526 views

nodes structure like file system

I would like to draw a picture that reflects some file structure. Below code works almost as expected. I need to adjust the connections between nodes so they don't start from the center of the bottom ...
16
votes
2answers
2k views

Genogram or family tree with PGF/TikZ

Since it has been recommended to me in Stack Overflow to post it here, I will do so: I want to draw a genogram with LaTeX. I tried to do this with TikZ, but since you need to model at least 3 ...
15
votes
1answer
852 views

How to typeset a prefix tree (aka trie)

I am currently trying to typeset a prefix tree (also called a trie). I can make a tree just fine with TiKZ, but I find myself unable to make the prefix tree nodes draw acceptably. I have attached a ...
14
votes
2answers
1k views

Highlight a group of nodes in a tikz tree

To make it simple, I want to highlight a group of tikz nodes like in the following picture It was borrowed from the JLatexEditor. I would like to know which Tikz commands I can use to do the job in ...
14
votes
2answers
545 views

Error with cleveref + enumerate + tikz-qtree

I get an error in my document in the following circumstance: Using the cleveref package And the tikz-qtree package (for drawing syntax trees) Inside an enumerate environment Here's a MWE: ...
14
votes
2answers
3k views

How to decrease the size of single node in mindmap?

In tikz's mindmap, I want to change the concept size for individual parents or children (not the entire system). It is simply possible to increase the size of a child node, by introducing minimum size ...
14
votes
1answer
1k views

Drawing shapes around Tikz Tree nodes

I have a Tikz tree in my Latex document as follows: % Set the overall layout of the tree \tikzstyle{level 1}=[level distance=4.5cm, sibling distance=6.5cm] \tikzstyle{level 2}=[level distance=4cm, ...
13
votes
4answers
514 views

How to plot a graph from its adjacency matrix and coordinates of vertices?

A similar question is here. If we give all the data of the vertices's coordinates and the graph's adjacency matrix, how to plot it with tikz, pstrick or other tool in tex? here are the data of ...
12
votes
1answer
453 views

draw a many edge from a node- Tree - tikz

i want to draw the tree in the following picture : i have write : \documentclass{article} \usepackage{tikz} \usepackage{color} \definecolor{red}{rgb}{1,0,0} \begin{document} ...
12
votes
1answer
387 views

How to expand a macro used in the range of a foreach loop?

Motivating Example: Suppose that I want to draw the following tree: root / \ / \ / \ A B C D This is easy enough to do by explicitly drawing the two subtrees as children of ...
12
votes
1answer
485 views

Nested node class with pictogram decoration

I'm wondering how can I define custom TikZ node class mynode thats allows my to use following syntax: \node [mynode,fill=yellow!40] {component} \child{ \node [mynode,fill=yellow!40] ...
11
votes
2answers
379 views

How to draw the recursive H-Layout tree using Tikz?

The following image shows a recursive H-Layout tree. It is called H-Layout because of its H unit consisting of 7 nodes. My problem is: How to draw such tree in a recursive manner instead of ...
11
votes
1answer
581 views

Organigram in Latex. Vertical distance between nodes

I want to draw a organizational structure in form of an organigram. I found this solution and tried to adapt it. The code: \documentclass{article} \usepackage{tikz} ...
11
votes
2answers
359 views

Recursive Stern-Brocot tree definition

I am trying to build a Stern-Brocot tree (enumeration of rationals). The result is nearly acceptable, but I am still dissatisfied with the following points. The edge from the parents goes to the ...
11
votes
1answer
1k views

Drawing a tree where many nodes have the same child in TikZ

I'm trying the draw a tree using the TikZ package, but I don't know how to draw a child node that has many parents. An example for that, is given by this picture My problem is how to draw the level ...
11
votes
1answer
1k views

TikZ: connecting nodeparts

I'm new to TikZ. Last couple of hours in fact. I was wondering if there was a way of connecting nodeparts from different nodes. Here's an example \documentclass{article} \usepackage{tikz} ...
11
votes
1answer
606 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 ...
11
votes
1answer
425 views

How to plot a graph from its adjacency matrix (coordinates manually specified)?

For example, I want to plot a graph whose adjacency matrix is [0,1,0;1,0,1;0,1,0]. I first plot three points labeled by p1,p2,p3, and link the points p1,p2, p2,p3. For a general case, how to link the ...
10
votes
2answers
817 views

How do I center this qtree?

I am trying to draw a tree using the tikz-qtree package, however I am having issues with the nodes of the tree being not centered. \documentclass[10pt]{article} \usepackage{tikz} ...
10
votes
3answers
692 views

TikZ: How to center captions below figures in matrix

I have three figures that I want to align in a matrix. Each figure is drawn in a different way and needs a caption that is centered below the corresponding figure. Here is what I currently have: ...
10
votes
3answers
1k views

Drawing a tree of grids

I need to draw a game tree that is similar to the image below. Is there any way to do this using the Tikz package so that the grids can simply be added as nodes?
10
votes
2answers
573 views

Jackson structured programming diagram (format a tree diagram)

I'm trying to create a Jackson structured programming diagram. This is basically a simple tree diagram with the exception that boxes can either have a circle (O) or a star (*) in the upper right ...
10
votes
2answers
653 views

Hyperlinked nodes in TikZ mindmap

I am trying to make a small mindmap such that some of the child nodes are hyperlinked. I tried to follow the advice given here, about the new node style hyperlink node, but the following MWE compiles ...
10
votes
1answer
1k views

macro for empty nodes in tikz-qtree

I'm trying to define a macro for writing empty nodes in a binary tree using tikz-qtree. Referring to the code below, I want the string \missing in my code to be replaced by \edge[draw=none]; {} as-is ...
10
votes
1answer
945 views

Tikz tree and position of single leaf in binary tree

I am constructing a binary tree which looks as follows: \begin{tikzpicture} \node {root} child { node {left} } child { node {right} child { node {rightmost} } ...
10
votes
1answer
380 views

Drawing PQ-trees

I need to draw PQ-trees in LaTeX which look like these: I tried trees in tikz but I had two problems: partially shade rectangles use vertical pointers from children to the parent, if the parent ...
9
votes
3answers
421 views

Mendelian Inheritence Chart

I would like to be able to create a simple chart that depicts Mendelian Inheritence, like this one: I'm not too picky about how it looks, as long as it depicts it accurately. Thanks!
9
votes
2answers
3k views

How can I produce this tree diagram in LaTeX?

I want to create the tree diagram shown below in TeX code (with the Level 1... level 3 by the side of the tree diagram). Also, I would like to know how to just put bullet points under a box. For ...
9
votes
2answers
5k views

TikZ tree sibling distance

I have been struggling a bit with TikZ and how to build trees. What I need now is some advice on how to improve the node placement. Right now I have these 2 trees: ...
9
votes
2answers
2k views

Joining two branches of a family tree

I'm trying to write out a family tree for a friend, and I have a few minor issues. My code is \documentclass{article} \usepackage{tikz-qtree} \begin{document} \tikzset{edge from parent/.style= ...
9
votes
1answer
245 views

Is it possible to cut a tikzpicture in half if the picture is too long and display it on two pages?

I'm using tikz (tikzpicture to be precise) to make some "drawings" (trees). The problem is that my "drawing" is too long to fit on one single page (it's too long). I was wondering what was the best ...
9
votes
1answer
768 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 ...
9
votes
1answer
3k views

Decision Tree with Tikz

I am trying to draw a decision tree. I have gotten very close to the end result with this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{trees,shapes,snakes} \begin{document} ...
9
votes
1answer
1k views

Mindmap/trees in TikZ

I can't get the following tikz examples to work (PGF manual 2.10, page 255). Most likely I can find a solution here that will save me time. Error: ! Missing \endcsname inserted. <to be read ...
9
votes
1answer
812 views

Family tree with multiple marriage ties

I'm trying to build a family tree, and among the many examples I've found online this one has been the most useful: How can I improve this family tree in TikZ? However, there are two things I cannot ...
9
votes
2answers
213 views

Using em unit instead of cm in text width shifts node label

When em unit is used in text width style directive, resulting label shifts ever so slightly to the left from its center position directed by preceeding text centered. When using cm unit, label is ...
8
votes
2answers
1k views

How put tick and cross mark around a node in tikz?

I want to draw something like this: This is my tikz code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \usetikzlibrary{trees} \tikzstyle{bag} = [text width=8em, text ...
8
votes
3answers
224 views

How can I make Tikz tree node arcs not cross over each other?

I am trying to build a tree (the theme is argumentation theory, where arguments attack and defend each other) in Tikz but after a few levels down the tree, nodes are placed on top of each other or in ...
8
votes
1answer
435 views

Snow on tikz-qtrees

Is it possible to add some snow on the syntax trees drawn by tikz-qtree? A simple example: \documentclass[11pt]{article} \usepackage{fontspec} \usepackage{savetrees} ...
8
votes
2answers
1k views

Tree-like diagram (flow chart?) showing selection of scientific papers when reviewing

I know the title I came up with is not self-explanatory, but I will show straight on some real life examples: Part 1, Question 1: Which package(s) is(are) closely suited for such diagrams? I ...
8
votes
2answers
321 views

How to highlight tree levels

How can i highlight tree levels to be some thing like that... I've drawn my tree with this code \documentclass[landscape]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
8
votes
3answers
313 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 ...
8
votes
2answers
971 views

Tree in tikz, with triangles standing for sub-trees

I need to draw a tree in tikz similar to this one: What I CAN'T DO is drawing the dashed triangle leaves (standing for unspecified subtrees). I think I can manage to draw the legend by myself, and ...
8
votes
1answer
2k views

Multi-rooted Tree-like Structures and Nodes with Multiple Parents in LaTeX

The qtree package seems to facilitate the drawing of simple trees only. Is there a way to incorporate: Multiple roots & Nodes with multiple parents in a tree in LaTeX?
8
votes
1answer
613 views

Edged arrows with tikz-qtree

I've seen this nice little example tree drawn with LaTeX, afaik not tikz. Can I draw similar arrows with tikz-qtree by specifying start and end point only?