As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [trees]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
40 views

Forest package - Drop nodes to lowest possible layer

I have the following forest code: \documentclass{article} \usepackage[linguistics]{forest} \begin{document} \begin{forest} for tree={ if n children=0{ font=\scshape, ...
Mew's user avatar
  • 539
2 votes
2 answers
59 views

Drawing partial trees of different sizes side-by-side

There exists an elaborate thread about how to draw rooted trees in LaTeX, e.g. for use in natural language applications. There exist packages other than TikZ to do this, like qtree. However, a common ...
Mew's user avatar
  • 539
-1 votes
1 answer
53 views

Permutation tree diagram

I need to draw a diagram that looks something like this. I found that the qtree package wouldn't let me create trees without labels for the nodes, and with tikz it seems possible but manually spacing ...
Aric's user avatar
  • 99
0 votes
0 answers
45 views

How to draw the taxonomy tree diagram in latex using forest package? [duplicate]

I'm trying to draw the following taxonomy tree diagram. I'm somewhat familiar with latex but completely new to forest package. I have gone through the answers to this question. However there is no ...
nlproc's user avatar
  • 9
3 votes
1 answer
51 views

Height / Bottom alignement of nodes in forest environment

I have a problem with the configuration of the height of the nodes in the forest environment. As you can see, the middle child is not aligned at the bottom with the rest of the child nodes. This is ...
Jeppe Kurt's user avatar
1 vote
1 answer
37 views

How to format (move and scale) only node label in forest decision tree

Since my real tree is too wide, I want to move and resize the node label -X_0+X_1>0 so that the red box at the end gets smaller because it dynamically adjusts its size to the nodes. The arrows and ...
vielfarbig's user avatar
1 vote
1 answer
37 views

How do I make this forest tree shorter without making it wider by adjusting the angles?

I'm having some trouble with this forest tree, my goal is to get it shorter without making it any wider, by adjusting the angles under CP and VP to be wider. When I try using the calign=fixed angles, ...
vmariani's user avatar
0 votes
0 answers
22 views

Same style for child as parent in tree

I am trying to create a tree in which the child nodes have the same appearance as their parent but I keep getting an unknown error when adding a child and attempting to use the same style: \...
Junglemath's user avatar
2 votes
1 answer
60 views

How do I move an entire forest tree to the left?

I'm looking for a way to shift this entire tree to the left, so it can fit on the page with the wider spacing I'm looking for. The white space on the left is there whenever I have the arrow drawn. \...
vmariani's user avatar
3 votes
1 answer
138 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} \...
Jim's user avatar
  • 35
2 votes
1 answer
49 views

Draw continuous line in tree

I have written a tree with Tikz. The code is below \documentclass[10pt]{article} \usepackage{tikz} \usetikzlibrary{trees} \makeatletter \date{} \author{} \makeatother \begin{document} \title{} \...
Alain Bertrand's user avatar
3 votes
1 answer
87 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 ...
Germano Massullo's user avatar
0 votes
1 answer
84 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} ...
Germano Massullo's user avatar
1 vote
1 answer
31 views

Forest: change depth of a sibling

\usepackage[linguistics]{forest} \begin{document} \begin{forest} [A[B[C]][D]] \end{forest} \end{document} Here A has two children: B and D. I would like to place D just right of C. How do I ...
Terrarium's user avatar
  • 483
-1 votes
1 answer
63 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 ...
Dreamer's user avatar
  • 109
0 votes
1 answer
76 views

Aligning heaps in Fibonacci heaps

I'm trying to align various heaps to make a Fibonnaci heap. I'm using the package tikz, and also using the instruction begin{scope} after begin{tikzpicture} to align various heaps. I managed to align ...
Pablo's user avatar
  • 35
1 vote
1 answer
51 views

How to change the color of a subtree in qtree?

I was wondering if there is a way to change the color of a subtree with qtree. I saw there is a post that you can do this in forest, but I don't know if there is a way to do it on qtree or tikz-qtree. ...
crealp's user avatar
  • 87
-1 votes
1 answer
47 views

Decorated trees using forest package

Using the package "forest", firstly i would like to draw the following tree (where terminal vertices could be either a dot or a letter), i could write a tree where all vertices are dots or ...
Jean-David Jcq's user avatar
1 vote
1 answer
48 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: \...
user avatar
0 votes
2 answers
95 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 ...
tobyfang's user avatar
0 votes
1 answer
99 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 ...
muhamad's user avatar
  • 11
0 votes
1 answer
93 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} \...
Rafael de Souza's user avatar
0 votes
1 answer
73 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?
Rafael de Souza's user avatar
2 votes
1 answer
177 views

How can I draw arrow like directory tree format in tikz?

I want to draw following figure, I was not able to manage drawing its arrow format where like a tree-like format: Reference: The Linux Programming Interface, Figure 41-1 My beginner approach: \...
alper's user avatar
  • 1,246
0 votes
1 answer
157 views

Make forest tree fit one page

I am trying to write a quite big tree. I found out about the forest package, and was able to generate one. However, I have got some problems with the size of the whole thing, since I would like it to ...
Mauro's user avatar
  • 127
2 votes
1 answer
29 views

Wider double border of a node in a tree environment

My question is pretty simple: I would like to draw a double border node in a tree environment as follows: With the current code I've got, my output is the following: We can see u has a double border ...
Rodrigo's user avatar
  • 471
0 votes
0 answers
27 views

Representation of particular conditions within analytic tableaux

I'm trying to represent some special conditions (see the attached image) in a document. I've tried to do it with bussproofs package and also with proftree[Tableau option] without success. No ...
Luis Subirana's user avatar
1 vote
1 answer
68 views

Drawing (upward facing, potentially unlabelled) binary trees and forests in LaTeX?

I'm trying to figure out how to draw (forests of) potentially undecorated binary trees in Latex. So far, I've looked at the "forest" package, which I couldn't get to work with what I want. I'...
MathFrak96's user avatar
0 votes
1 answer
29 views

How to return/realign/reunite a branch of a tree structure to the original parent lineage using the forest package?

I am drawing etymological trees using forest and I am wondering if I can reunite my forked-off branches back with the main "line" somehow. Essentially the question could also be: Can one ...
Devouring Radiant Light's user avatar
2 votes
1 answer
44 views

Morpho-phonological insertion in syntactic tree

I need to draw a tree that partially reproduces one from a paper I'm citing in my dissertation. With the following code I obtain the tree below. However, what I need is to draw the connection between ...
consume's user avatar
  • 41
0 votes
2 answers
139 views

Tree Diagram with Filesystem Branches

I am trying to draw this tree diagram exactly: I edited my code and it looks better, but still needs more work. Here is the code and result: \usetikzlibrary {trees} \tikz [font=\footnotesize,grow=...
Ali 's user avatar
  • 63
0 votes
1 answer
54 views

Trouble drawing an ellipse around two elements of a forest environment

I have seen some questions about the same topic in the forum, but I've been unable to reproduce the same output in my code, so I would start by saying sorry for posting similar questions but here we ...
Rodrigo's user avatar
  • 471
0 votes
1 answer
88 views

Node names are too long for forest

I've been trying to draw a tree like this: But I came across the problem that the node names are apparently too long... So the code below doesn't work. (If you replace $\lambda x.\lambda e. \text{...
user125234's user avatar
1 vote
1 answer
148 views

Aligning children across multiple tiers in forest

In the following tree, I would like the bottom right node (in the base tier) to be directly under its parent, but it seems to automatically align with its sibling in the tier above. I've tried several ...
Jack Stodart's user avatar
3 votes
2 answers
255 views

Problem with binary tree

I am drawing AVL trees using tikz. I have this code: \documentclass{scrartcl} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \begin{center} \begin{tikzpicture} \node[circle,draw](z)...
User12345's user avatar
0 votes
3 answers
180 views

Using Latex code chunks as library - For reusing latex elements such as figures in multiple representations

In object programming languages often structs exist which help you to reuse code twice or often, but writing that code only one time. A convenient way to write Latex code if the author does not want ...
Jan Hackenberg's user avatar
4 votes
1 answer
55 views

Tikz colour only the one branch of tree

Here is my tree: \begin{figure}[H] \centering \begin{tikzpicture}[ grow=right, edge from parent/.style={draw, -latex}, level distance=20mm, ...
Five9's user avatar
  • 145
0 votes
2 answers
472 views

Tikz tree does not show (in Springer Nature template)

The LaTeX code of the tree works in other templates, but when copied to the Springer Nature template, it shows errors. Here is my code: \RequirePackage{tikz} \documentclass[default,iicol]{...
Lee's user avatar
  • 127
0 votes
0 answers
42 views

How do I specify that tikz not use arrows

I'm writing a latex doc where I have several diagrams. One of my diagrams requires arrows, but then I also have a syntax tree, and for that I don't want the edges to be arrows. Can I specify that ...
user257042's user avatar
0 votes
0 answers
41 views

Uniform edge paths throughout the tree

How do I achieve uniform edge paths throughout the tree, the one similar to the path from root to the immediate children? That is to have sharp corners instead of curved corners here. Also what's the ...
SolidMark's user avatar
  • 1,219
-2 votes
1 answer
180 views

How to draw picture like this in Latex?

How can I draw picture like this in Latex? Any pointers welcome.
Exploring's user avatar
  • 429
3 votes
2 answers
243 views

Nodeconnect lines don't show up

I just installed miktex/texmaker and run an example from here http://mally.stanford.edu/~sr/computing/latex-example.html .But the lines that connect the tree don't show up like in the example. How do ...
MechanicX's user avatar
5 votes
1 answer
275 views

Drawing an unbalanced infinite growing tree

I want to draw a tree that looks like this (disregarding the two boxes, info regarding the tree heights and the node coloring, only the tree itself): I know I could draw this tree manually. Is there ...
ihavenoidea's user avatar
2 votes
1 answer
194 views

Additional info to Forest Tree & fit tree to page

I'm trying to reproduce the image below. As you can see on the left margin has some info: Channel, Code Type, Sender etc. aligned with descendants. Also, on Repertoire of codes and channels > ...
Mafsi's user avatar
  • 644
3 votes
1 answer
235 views

Drawing Arrows Between Tikz Boxes Around Forest Nodes (w/ MWE + Screenshot)

I am using MacTeX/TeXLive 2021, the newest version of TeXStudio, and Latexmk. I would like to draw an arrow from the green box to the purple box in the picture below. It would replace the current pink ...
NLing's user avatar
  • 343
2 votes
1 answer
194 views

Forest Node Alignment with Tikz Rectangle Drawing

I am using MacTeX/TeXLive 2021 and the newest version of TeXStudio. For compiling, I am using Latexmk. In the tree below, I would like for the green box placed on the VP to affect the positioning of ...
NLing's user avatar
  • 343
1 vote
1 answer
90 views

Dimension too large error using forest package

One forest in my document produces some weird problems. This is the problematic excerpt: \documentclass{article} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{amssymb} \usepackage{forest} \...
bdkNic21's user avatar
2 votes
1 answer
147 views

Drawing a tree with rotated leaves using tikz-qtree

I'm trying to draw a tree with some text in the leaves that I'd like to rotate. The below code works fine except that the edges to the leaves are anchored to the right-hand side of the leaves rather ...
tomash's user avatar
  • 227
0 votes
2 answers
376 views

Drawing Latex tree and make arrows in it and change the spaces

I am currently typing a lecture note. Today, I have to make a tree in Latex. Style/application: text boxes and \tiksstyle Title: Types of equations Types of textboxes: border is black border is ...
NotStanding with GoGotaHome's user avatar
0 votes
1 answer
65 views

How to get a count of leaf nodes?

I'm new to LaTeX, and am working on a tree using forest. Is there any way I can find the total number of nodes in my tree which have NO child nodes? I've tried searching Google and Stack Exchange, but ...
Duncan Joly's user avatar

1
2 3 4 5
12