Questions tagged [tikz-trees]

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

Filter by
Sorted by
Tagged with
3 votes
1 answer
75 views

Drawing binary trees with LaTeX labels and distinct terminator

I created some code based on an answer here: Drawing binary trees with LaTeX labels. \documentclass[tikz,border=5]{standalone} \usetikzlibrary{graphs,graphdrawing,graphs.standard,arrows.meta} \...
  • 35
0 votes
1 answer
43 views

Creating a floating tree next to another

I'd like to draw a smaller subtree inside a circle stemming out of this tree, in the following way: Is there a code I can use to do that (I'm using forest)? Thanks a lot!
  • 39
1 vote
1 answer
34 views

Fitting a Latex Tikz figure in a page

I am trying to create a figure in latex using Tikz. But its not fitting in a page. I do not need the levels to match for different groups. \documentclass[10pt,twoside,a4paper]{memoir} \usepackage{...
  • 13
0 votes
1 answer
28 views

Drawing tree in latex with horizontal bars [duplicate]

I want to draw the following tree in latex. But, I don't know how to do it. Over searching on internet I found other kinds of tree but not this kind. I will be glad if someone can help me drawing this....
3 votes
3 answers
120 views

Creating this tree structure with LaTeX

I would like to easily create tree-like structures like D─┬───────────┬───A R─┬───A─┬─A R─┐ R─┐ R R R D is the top root node. It starts a horizontal line to the right, which ...
  • 167
2 votes
2 answers
71 views

Colored rooted trees with white and black nodes (Butcher trees)

I found the solution to draw single-colored rooted trees (Butcher trees as used in numerical analysis) in Butcher Trees in TikZ I would like to adapt this to colored trees with white and black nodes. ...
  • 55
4 votes
2 answers
128 views

Customize node shape and "fork" in forest tree

I am struggling to make a phylogenic tree. Below is a minimal example : \documentclass[10pt]{article} \usepackage{tikz} \usepackage[edges]{forest} \usetikzlibrary{trees,shapes,snakes} \begin{document}...
0 votes
1 answer
41 views

add subscript to TikZ figure of neural networks

I have the following TikZ code... \documentclass[border=3pt,tikz]{standalone} \usepackage{amsmath} % for aligned %\usepackage{amssymb} % for \mathbb \usepackage{tikz} %\usepackage{etoolbox} % for \...
0 votes
1 answer
39 views

Line Break Inside Tikz Text-Decorations

Using the text along path decoration option of tikz, I would like to be able to do line breaks in the text. Obviously, standard commands such as \\ do not work. Right now, I am using two different ...
0 votes
1 answer
45 views

centering tikz forest diagram?

I have a tikz/forest diagram that is almost complete, with a few remaining issues. 1a/1b: the title and the diagram are not aligned. I'd like them to be centered, so either the title needs to move ...
  • 15
0 votes
1 answer
36 views

How to make variable rectangle sizes in latex organigram chart

I hope adapted the following organigram chart from How to convert my word organisation chart to latex as replied by @alien (thanks very much @alien). The code works very fine. However, the rectangles ...
1 vote
0 answers
38 views

Attempting to recreate the 'TOC as a TikZ mind map'

I'm attempting to recreate the 'TOC as a TikZ mind map' as featured on p.47 of Jean-Francois Burnol's "The etoc package" but I cannot resolve the error that occurs on line 115: (\...
2 votes
3 answers
53 views

Tikz: how to attach labels to edges in trees where some nodes are missing?

I want to grow a tree that has some nodes empty/missing so that the lines directly connect: \begin{tikzpicture} \coordinate child { child {node {pAp} edge from parent node[left] {x}} ...
  • 123
1 vote
1 answer
52 views

changing edge type and adding

I'm new to tex, and am in the process of creating a flowchart. I've been able to build off of some templates I've found, but am stuck on modifying 3 features: I would like the edge (line) to be "...
  • 15
2 votes
0 answers
49 views

join 2 genealogy trees on 2 different points

The following LaTeX document contains two genealogy trees joined on Matilde Oltre. Now I would like to join Vittorio Moletti with Modesta Oltre (Matilde's sister) as a couple, having Rina Moletti and ...
8 votes
4 answers
802 views

I tried drawing this diagram in latex but I'm having trouble with the arrows

This is the diagram I want to draw This is what I've been able to do Here's my code \usepackage{tikz} \usetikzlibrary{shapes, arrows.meta, positioning} \begin{document} \begin{figure}[!ht] \...
0 votes
1 answer
55 views

overlapping genealogy trees

I am trying to join two genealogy trees, but they are overlapping. \documentclass{article} \usepackage[paperwidth=500mm,paperheight=500mm]{geometry} \usepackage[all]{genealogytree} \begin{document} ...
0 votes
1 answer
29 views

How to reduce node spacing in forest when using a custom edge path?

Consider the following code: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{forest} \title{Bla} \author{John Doe} \date{April 2020} \begin{document} \maketitle \begin{forest} ...
0 votes
1 answer
39 views

Tikz matrix content is not layed out in tree

I want to put a matrix into a tree layout. The matrix itself appears at the right place, but its contained node is outside of the tree. \tikz [ tree layout, level sep = 1cm, ] { \node[] (1) {1}; \...
  • 205
1 vote
1 answer
30 views

TiKZ tree doesn't grow as intended

I have this code: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{mindmap} \begin{document} \begin{tikzpicture}[text width=2.7cm, align=flush center, grow cyclic, ...
  • 2,496
0 votes
1 answer
45 views

decision tree formatting (edges merge)

I am trying to draw a decision tree that's structured like this: here's what I have so far: \usepackage{tikz} \begin{document} \begin{tikzpicture} [ grow = right, sibling ...
0 votes
2 answers
54 views

How do I draw a decision tree like this?

I've tried plain-old TikZ and Forest and cannot get close. Thank you!
  • 205
-1 votes
1 answer
46 views

How to plot a horizontal tree with edges having adjustable length and ending with nuts?

I want to plot trees like these: These trees appear in the theory of branching chains in modern probability. But I have no idea how to realize it via latex. Could anyone help on it? Here are my ...
  • 109
0 votes
0 answers
23 views

How to have only two nodes with one diffrent child?

I'm trying to create the bellow graph: But i don't know how the 2 nodes (42.249,33.296) can have different child. Here is my code: \begin{center} \begin{tikzpicture}[grow=right, edge from parent/....
0 votes
1 answer
40 views

How to center a value in a tree graph

I'm trying to center a value in one probability graph tree, but i can't. Can anyone help me? This is the code that i'm running and this is the output.I'm trying to center the value 56.444, but with ...
1 vote
0 answers
29 views

Problem with edges over text when using "edge from parent fork down"

I am using tikz to depict a decision tree, but something is going wrong: some lines are being plotted above the text (see picture below) This is the code I am using: \begin{tikzpicture} [ level ...
  • 11
-4 votes
1 answer
106 views

draw diagram in latex

my question is when I replace the alphabet with a phrase gives me the error out of a compilation \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \usepackage[a4paper,margin=...
  • 23
0 votes
1 answer
33 views

tikz trees. child nodes are not showing up as expected. Where is my error?

I am learning tikz tree so I can make flow chart. In this below, I have linear and seperable children that are supposed to be children of node degree 1 but they show up mixed with children of node ...
  • 19.2k
2 votes
1 answer
43 views

Tikz trees: How to add multiple lines to terminal nodes to avoid overlapping nodes

The text of my terminal nodes for my tree is overlapping. Does anyone know how to place the labels on multiple lines? I checked stackoverflow but did not find a solution. I can space out the tree ...
0 votes
3 answers
62 views

Tikz trees: How to add label to dashed information set

I searched online and in stack overflow for how to add a label to a straight dashed information set but was not successful. I see suggestions to add a label to a curved dashed information set but ...
1 vote
3 answers
44 views

How to insert two syntax trees with brackets in a line with tikz-qtree?

I have been reading Heim & Kratzer 1998, and I find that the pattern of compositional analysis interesting. The tree drawing is difficult, for it need to insert two trees in a line and each tree ...
2 votes
1 answer
45 views

Can I 'decorate' a simple `qtree`?

I have the following code which represents a package qtree tree: \Tree[.${((q \to (\neg r)) \land (\neg(p\lor q)))}$ [.${(q \to (\neg r))}$ [.$q$ ] [.${(\neg r)}$ $r$ ...
2 votes
1 answer
79 views

How to split my figure (folder directory tree) into two columns in latex as shown in the screenshot?

\documentclass[tikz, border=12pt, a4paper]{standalone} \usepackage{tikz} \usetikzlibrary{trees} \usepackage[edges]{forest} \usepackage{sectsty} \usepackage{array} \usepackage{multicol} \usepackage{...
0 votes
1 answer
25 views

How to specify the position of main object without redrawing all figure?

I have plotted the original graph (left) and I need to draw a tree (right). In the origial graph the node v1 is the main circle. It was used to draw all objects (circle and lines). My problem is the ...
  • 395
0 votes
2 answers
84 views

Improvement of Game Tree in Forest: Visualisation of Backward Induction

I need help finishing my game tree in forest . I have successfully managed to represent the different levels and the basic structure of the tree with a continuum of moves, see the code. However, I ...
  • 15
0 votes
2 answers
88 views

how to use tikz to draw graphs like the following

I need to generate graphs like the following two. I cannot figure out how to use graphviz to get the work done. One problem I ran into is the pos of these nodes; no matter how I tried, the pos just ...
  • 365
1 vote
1 answer
53 views

Improvement of Game Tree in Forest with continuum of moves

I need help with an application within the Forest environment. I would like to create a game tree in Forest where there is a continuum of moves. These are marked with arcs, as can be seen in the top ...
  • 15
1 vote
1 answer
35 views

Adding text to arrows in Tree

I am currently working on the following chart: What I am trying to do is to include 'Yes'and 'No' in their respective arrows rather than in its own box. This I what I have achieved so far: \...
1 vote
2 answers
86 views

How to make nodes the same size without influencing cells in matrix

I'm drawing a tree with tikz and would like the nodes to all have the same size, regardless of content. This is what my code currently does: This is my code: \documentclass{standalone} \usepackage{...
  • 13
0 votes
1 answer
30 views

Tikz extra node before forest

I would like to combine a forest with some kind of variable initiation on top of the first node. This is the code I currently have \documentclass[]{standalone} \usepackage{forest} \usetikzlibrary{...
0 votes
2 answers
73 views

How to circle labels below Tree leaves in TikZ

I am seeking for the tree as in the following graph. But I am not sure how to circle the labels below tree leaves with dash lines. What I currently get is the following: \begin{tikzpicture}[level ...
1 vote
1 answer
46 views

overlapping due to many entries in Tikz trees

I want to use Tikz Trees to represent a classification, my problem is that I have many entries so they overlap, and if I increase the spacing as suggested here the figure will go outside the ...
  • 181
0 votes
1 answer
48 views

Trying to draw dotted region highlighting a portion of the graph

I am trying to draw the following in LaTeX: I am able to draw the graph but unable to draw the dotted region. I am using tikz-network. Help is much appreciated. The code: \begin{tikzpicture} \...
  • 101
0 votes
1 answer
80 views

Something is wrong with tikz graphdrawing

I wanted to see some isomorphisms of the Petersen graph; I took the code from here, and run with several layouts from here, but the result with tree layout is not isomorphic to the Petersen graph: \...
  • 3
0 votes
1 answer
36 views

Edges of a tree do not touch nodes [duplicate]

I have a tree, the code and result look like below. \documentclass[border=10pt]{standalone} \usepackage{tikz} \usepackage{pgfplots} \tikzset{ treenode/.style = {shape=rectangle, rounded corners, ...
  • 119
0 votes
1 answer
78 views

How to design a decision node with both descrete and continuum action set?

I want to use istgame of tikz to design a decision node as a part of an extensive form game theory model in which the mover has 2 possible actions: 1. reject or 2. select a real number from a ...
  • 11
3 votes
1 answer
89 views

Draw block diagram using Tikz package

Please how can I draw the figure shown below in Latex? I copied the figure from a journal. I am currently using Tikz package. Thank you for your help. Update: My code is shown below. \begin{...
  • 125
0 votes
1 answer
84 views

How can I draw dots in a rooted tree structure graph?

I wrote this code but I would like to add dots between the points to indicate that there are more points between the points I draw. \documentclass[border=3.141592]{standalone} \usepackage{forest} \...
2 votes
0 answers
84 views

Help to draw attached diagram in tikz

Kindly help to draw this diagram in tikz. How many level should I include for this type of diagram. The issue is not using forks down in the next level.Thank you \documentclass[a4paper, 12pt]{article}...
0 votes
1 answer
61 views

How can I draw a rooted tree structure graph? [duplicate]

I just started doing things with TikZ today and I don't know how to draw a graph which should look like this: Can someone please help me?

1
2 3 4 5
24