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

learn more… | top users | synonyms

1
vote
1answer
35 views

Text alignment and form of connectors (edges) in tikz tree

I'm completely new to tikz and try to draw a tree structure. I have tried different options, but could not modify it as I wanted it to look like. It currently looks like that: Tikz code ...
1
vote
1answer
52 views

Draw multiple inheritance hierarchies

I have to draw multiple inheritance type hierarchies. The worst case is something like the following: I used tables and tree-dvipsto draw these figures, but I am now looking for something that is ...
3
votes
1answer
44 views

How to use bracket symbol in node name in forest?

\documentclass{article} \usepackage{forest} \begin{document} \begin{forest} [Z [$K[2]$] ] \end{forest} \end{document} How can I use brackets in a node name? Not necessarily inside math. The above ...
2
votes
1answer
49 views

Horizontal tikz-qtree level distance too big while using edge style

After tweeking with tikz-qtree a lot, i ended up with the result below. But i dont know why the level distance after XML node is too long, and even when setting the level distance for said level, the ...
8
votes
3answers
155 views

How to move tree leaf nodes horizontally after automatic positioning?

I'd like to draw trees like the following: That is, I have edges which are crossing. The tree should be drawn like a regular tree (without crossings) except at the last level where the leaves can ...
2
votes
1answer
47 views

Nodes put one on top of the other

I am a total beginner in tikz and I am using the following code (slight modification from texample.net) to draw 2 red black trees. The problem I am facing is that both trees are placed one on top of ...
3
votes
1answer
55 views

How to obtain the same-sized-boxes?

I want all the rectangle have the same size. What should I do? \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{tikz-qtree} \tikzset{edge from parent/.style= {draw, ...
1
vote
2answers
42 views

How can I put something under something in a Tree?

\documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \begin{tikzpicture} \tikzset{grow'=right,level distance=32pt} \tikzset{execute at begin node=\strut} ...
1
vote
2answers
92 views

How can I add “first second…” ?

\documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \tikzset{edge from parent/.style= {draw, edge from parent path={(\tikzparentnode.east) -- +(8pt,0) |- (\tikzchildnode)}}} ...
2
votes
1answer
32 views

How can I change < to [ ?? I want the picture with 1 2 3 4

\documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \begin{tikzpicture} \tikzset{grow'=right,level distance=32pt} \tikzset{execute at begin node=\strut} ...
1
vote
1answer
34 views

How can I add space for tikz? I want add space between 1 and 2, also 2 and 3

\documentclass{article} \usepackage{tikz} \usetikzlibrary{trees} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \node {One}[edge from parent fork right, grow'=right, ...
0
votes
0answers
87 views

Energy spectra in LaTeX

I want to draw energy spectra like in the attached photo. Can anybody help me?
6
votes
1answer
71 views

Constructing a tree in LaTeX

I am having real trouble creating a tree. So far I have \documentclass{article} \usepackage{tikz-qtree} \begin{document} \begin{tikzpicture}[every tree node, level distance=1.25cm,sibling ...
16
votes
6answers
481 views

Cayley Graph of Free Group in TikZ

What is the best way to create a TikZ picture which resembles the image below (Caylay Graph of a free group) without using absolute positions and doing everything "manually"? The picture has a very ...
5
votes
2answers
77 views

How to break lines in a node of a tikz tree

This is the code I have: \begin{tikzpicture} \tikzset{edge from parent/.style= {draw, edge from parent path={(\tikzparentnode.south) -- +(0,-5pt) ...
3
votes
3answers
71 views

Change the distance of text lines in tikz nodes with Beamer

I have a tikz tree that doesn't fit on the slide. The theme and the linespread is given, so I only want to change the line distances of the text in the tikz nodes. But nothing worked for me :( ...
5
votes
1answer
170 views

Tikz Graph without using a tikz document class

The following solution is absolutely perfect for my purposes, but I noticed that it requires \documentclass[tikz,border=5]{standalone}. Is there a way to get the same result with a standard ...
3
votes
2answers
120 views

Tikz tree indentation

I'm trying to draw a large family/directory tree using tikz-tree. I've found this question in Stackexchange, which almost works, but not quite. Using the code provided in the answer I get overlapping ...
4
votes
2answers
82 views

Adjust node level using phantom node

Consider the MWE: \documentclass[landscape]{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{document} \tikzset{ treenode/.style = {align=center, inner sep=2pt, rounded corners = ...
6
votes
3answers
226 views

Horizontal - Vertical connectors in a tree (in place of slanted lines)

Here is the MWE: \documentclass[landscape]{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{document} \tikzset{ treenode/.style = {align=center, inner sep=2pt, rounded corners = ...
2
votes
1answer
61 views

Tree with tikz looks the way it's meant to look but still errors are popping up

I just started learning LaTeX and to do so I tried to create a PDF of my last logic assignment. Therefore I had to create a resolution tree. After Googling I found some examples for using tikz-trees ...
5
votes
2answers
153 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 ...
4
votes
1answer
90 views

I want Tikz template for taxonomy Tree like the below mentioned image.

I could not find any Tikz template to fit in the same amount data like the below image. I did not get the same kind of template also. Am trying to find if there is any other alternative or same kind ...
1
vote
1answer
87 views

How can I draw a tree like in the image?

Hi I want to draw a tree like in the image, with branches growing up and down from the root(nature), also I need to put a pay-off at the end of each node and labels in each edge parent node. Also ...
0
votes
1answer
38 views

Replace vertex in TikZ

I'm completely new to TikZ and took a look at an example graph: http://www.texample.net/tikz/examples/prims-algorithm/ For a presentation I need to replace a vertex by another vertex at a certain ...
2
votes
1answer
134 views

Horizontal decision tree in TikZ

I've been looking for a TikZ example for a while now that looks something like the attached powerpoint picture. I can't imagine that nobody has done something similar. I tried adapting this example, ...
1
vote
1answer
62 views

Adjust edge endpoints depending on node label

I would like to draw a tree where the position of edge endpoints relative to the node depends on contents of the node, and may change between the parent edge and the child edges, to point out a ...
3
votes
1answer
63 views

Incompatibility of calc and some styles for forest

I got a cool solution for integrating a tabular-like object into a forest figure (Relating tree nodes in forest to content in a table) but this is incompatible with another cool solution for fixing ...
3
votes
1answer
62 views

Showing Tikz tree nodes after each other (using bracketing format of \Tree)

I want to display a tikz tree node by node. First A, then A and B and in the end all nodes. Note that I need to do it with the presented format: \Tree [. \node{A};] since trees are automatically ...
6
votes
1answer
124 views

Relating tree nodes in forest to content in a table

I want to draw the following figure: I now converted my trees to forest and the following code is what I have: \documentclass{article} \usepackage{forest} \forestset{ sn edges/.style={for ...
6
votes
1answer
163 views

How to draw the physical tree with balls under both the stress of strings and gravity?

I want to draw the physical model of graph that has a ball for each vertex and a piece of string for each edge. In this model, if you lift a ball high enough, the other balls are pulled up along with ...
2
votes
3answers
172 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] ...
3
votes
2answers
73 views

boundary around nodes corresponding to euler walk

How can one automatically draw the red line corresponding to euler walk in tikz. I tried using beizer curve, and a lot of other methods, but had to finally set coordinates manually to get somewhat ...
1
vote
1answer
118 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 ...
5
votes
3answers
128 views

Setting \tikzstyle inside \foreach

I am building a tree structure in tikz and am following this texample, which suggests adding styles for the children according to their depth in the tree (first, second and so on). The purpose is that ...
1
vote
2answers
175 views

Branch tree LaTeX

I need to make a branch tree in LaTeX just like in the picture below. I need some help with the code. I don't know how to make it.
-1
votes
1answer
143 views

drawing a 2D-plane

i need to draw this plane, but i don't know how can anyone help me? its important i need it in my master report. i try to use this from an old example to start with but it didn't work ...
4
votes
1answer
92 views

labeling edges in tikz using boxes

I'm creating labels for edges by manually creating a node and placing it in the center of the edge. Is there a cleaner way to do it? Also I would like to have the edge invisible inside the label. ...
3
votes
1answer
48 views

tikz Controlling the position of prongs of underbrackets in an equation

I would like to make a two (or more) pronged underbracket (or overbracket). In particular, I would like to control the: number of prongs. position of the prongs by specifying to which characters in ...
3
votes
0answers
32 views

Connecting two nodes from different forest trees [duplicate]

I want to draw the following figure without pstricks: What I have is the following code: \documentclass{minimal} \usepackage{forest} \usepackage[external]{adjustbox} ...
1
vote
0answers
313 views

SIMPLE mindmap combined tree

I want to combine a simple mind map with a tree. First I tried to get something like the following mindmap from pgf manual p. 79: Thanks to @cfr, I could get the mindmap to work. Using the source ...
1
vote
0answers
124 views

Highlight a group of nodes in a tikz graph

Is it possible to extend the approach of the question: Highlight a group of nodes in a tikz tree to a generic tikz graph? In particular I don't have a graph in form of a tree, so I can't specify the ...
3
votes
0answers
156 views

Tikz graphdrawing library with tree layout throws error

When I compile the following snippet \documentclass[tikz,border=0pt]{standalone} \usetikzlibrary{graphdrawing} \usetikzlibrary{graphs} \usetikzlibrary{shapes.misc} \usegdlibrary{trees} ...
2
votes
1answer
128 views

Produce a tree diagram to display football matchup

I am working on a Math Project involving football matches. I hope I can produce a tree diagram like this. Could anyone help me with the basic code? I feel producing this diagram requires tikz, which I ...
5
votes
1answer
159 views

pgfmathparse inside tikz child doesn't work

Consider the following MWE: \documentclass{article} \usepackage{pgf, tikz} \begin{document} \begin{tikzpicture} \node {} child foreach \i in {1,2,3} {node {$\i$}}; \end{tikzpicture} \end{document} ...
2
votes
2answers
105 views

How to elongate the branches attached to one specific node?

I'd like to make longer only two immediate branches attached to the VP node (red ones in the picture) without altering the height of the other branches above and below. Any idea? Thanks! ...
1
vote
1answer
43 views

Controlling the height of roof in tikz-qtree?

I am trying to make the roof (triangle) shorter than the near branches. Is there any way to do that? Thanks. \documentclass{article} \usepackage{tikz-qtree} \usepackage{tikz-qtree-compat} ...
4
votes
1answer
141 views

A tree with complicated nodes as each child in tikz

Trying to make a tree where each child is a set of nodes that can be created separately and then linked somehow in to different positions in a tree. Lets say I have a group of nodes and edges such as ...
4
votes
2answers
315 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 ...
5
votes
1answer
114 views

Connecting arbitrary text in `forest`

I already asked this question with regard to tikz-qtree (Connecting text in a tikz-qtree with other text by arrow), but maybe there is a better way to do this in forest. I have the following tree: ...