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

learn more… | top users | synonyms

4
votes
2answers
62 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
176 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
55 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
116 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
57 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
78 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
32 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
114 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
48 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
58 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
50 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
108 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
147 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
139 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
57 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
80 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 ...
4
votes
1answer
77 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
134 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
117 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
70 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
46 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
176 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
91 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
128 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
96 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
130 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
99 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
37 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
124 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
272 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
102 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: ...
4
votes
2answers
78 views

Forcing a node or a tier to be set below a certain other node in forest

Working from Typesetting Dependency Grammar trees with discontinuous constituents I try to set a graph with two discontinuities. The first figure does what I want. It has nacc and the other N aligned ...
3
votes
2answers
399 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 ...
3
votes
2answers
66 views

Getting non-sense edges in my tree, or, how to get labels on edges

I have the following code. If I remove the edge commands, everything is fine. I suppose the problem is that my nodes have the same contents, but I can't avoid this obviously. Bad code: ...
1
vote
2answers
73 views

A gametree with variable choices

Hello everybody i am making a simple game tree using tikz, i am almost done but i need som finishing tuches to make it just right. This is the code so far \hspace{.1in} \tikzstyle{level 1}=[level ...
13
votes
4answers
521 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 ...
3
votes
3answers
263 views

My version of Red-Black Tree

Here's the code I have \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \tikzset{ treenode/.style = {align=center, inner sep=0pt, text centered, font=\sffamily}, ...
4
votes
2answers
109 views

Add big bracket below/over tikz node

How can I prolong the big bracket to not only cover yyyy but also the uuuu node? \tikzstyle{level 1}=[level distance=3.5cm, sibling distance=3.5cm] \tikzstyle{level 2}=[level distance=3.5cm, sibling ...
3
votes
3answers
186 views

How to cross out a child of a node in a tikz tree?

Consider this simple tikz tree: \documentclass{article} \usepackage{tikz} \usetikzlibrary{trees,shapes,snakes} \begin{document} \tikzstyle{mynode} = [text width=4em, text centered] ...
4
votes
1answer
56 views

arrows crossing over nodes in tikz

I have drawn a tree by tikz package, but the arrows are crossing over nodes. is there any switch to prevent this? \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{graphdrawing} ...
4
votes
2answers
166 views

Drawing linked trees

I got great help earlier defining a tree using forest (thanks again to cfr!). I would like to be able to break down a tree into subtrees and draw links between them... either in the same forest or ...
3
votes
1answer
82 views

Labels above tikz tree forks

I have an upward-growing tree showing the flow of a proof, as follows: \documentclass{article} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \resizebox{\textwidth}{!}{% ...
4
votes
3answers
135 views

Use \hfill inside tikz node

I would like to use an \hfill in a Tikz node, in order to have some text on the left and right of some node. Look at the following MWE \def\left{L\hfill} \def\right{\hfill R} \begin{tikzpicture} ...
3
votes
2answers
212 views

Problems with \newgeometry by using landscape and minipage

I try to rotate a tikz-tree and a table which are in a minipage environment by using \landscape because the tree besides the table is to wide. Now, the tree and the table are not centered. The last ...
2
votes
1answer
212 views

Trying to create a simple binomial tree in beamer

Following the example in Unknown error using tikz matrix of nodes in beamer I removed the errors I got but the tree is still not produced correctly. I am trying to reproduce in beamer what I saw in ...
9
votes
1answer
247 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 ...
5
votes
1answer
857 views

Drawing Graph of Markov Chain with “Patches” using Tikz

First time using Tikz. Haven't found any documentation on drawing graphs like these, so I have been reading other examples and trying to modify their code to fit my example. I am trying to reproduce ...
7
votes
2answers
340 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: ...
2
votes
1answer
56 views

Tikz picture larger then page

I have a graph, containing a few nodes, but because of the size of it dose it extend beond the page. How can i set it to automatic scale so it will fit the page? Also what can i do to center it on the ...