Questions tagged [trees]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Tree of matrices and grids

My final objective is to replicate this picture using Tikz. I think the best way to do this is by creating a tree of matrices, as this code \documentclass{book} \usepackage{skak} \usepackage{tikz} \...
3
votes
2answers
117 views

How to draw formal sums of trees?

I would like to draw something like this: in a way that, as in the picture, the + sign is centered with respect to the height of the trees. so far I used the tabular environment but the result is ...
5
votes
2answers
116 views

How to make a node grow differently when other nodes are forked

I am a beginner in latex and am very interested in exploring it's wide range of features. I wanted to build a family tree and decided to use the forest package. I use this manual - forest_doc. I ...
2
votes
2answers
56 views

CGEL style fusion of functions trees using Forest in TeXstudio

How do I draw a CGEL-style fused determiner-head in an NP. This get's the basic shape of it, but I'd like everything from the Determiner-Head down to be centred under the NP at the top and an edge ...
3
votes
1answer
82 views

tree with branch

I want to draw the following picture in Tikz (I drew this in ipe). I am only able to draw the following picture using the code below. \documentclass[tikz, border=5pt]{standalone} \begin{document} \...
0
votes
2answers
40 views

make nodes distances equal

How do I reduce the space between the two children marked red? Adjusting s sep does not reduce the distance but pushes the next generation downward with equal spacing. \documentclass{article} \...
5
votes
2answers
367 views

How can I draw a simple factor tree like this?

I am trying to draw a factor tree for my elementary students like this. What are the possible ways / packages to do it efficiently?
2
votes
0answers
31 views

How to arrange the tree diagram nice way to save space?

I want to arrange the tree diagram in a nice way to save space. Here is the latex code that corresponds to the diagram. Please help me. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[...
7
votes
2answers
196 views

Aligning ducks and their labels in a tree

I'm building a tree of labelled tikzducks. An MWE would be \documentclass{scrartcl} \usepackage{tikz} \usetikzlibrary{ducks} \begin{document} \begin{tikzpicture} [level distance=4cm, sibling ...
1
vote
1answer
65 views

Stern-Brocot tree where each node has two fathers

I would like to draw a "tree" like the one in the picture below. I tried the forest package, but I was only able to draw the tree with the black edges with root 1/1. \documentclass{article} ...
3
votes
2answers
65 views

Truth table generation giving weird math mode error?

I'm trying to write a truth table in LaTeX so that it's only takes up as much space as needed. I got the idea to do this with the forest environment when I created truth trees (semantic tableau) using ...
2
votes
2answers
73 views

Tree branching starting from specific character of node

I am doing parse trees for propositional logic formulas and I want to have the branches of a tree start from the main connective. Notice that the branching starts at a specific character for each node....
5
votes
2answers
152 views

Forest package: multiple lines in a leaf

I am trying to display a classification tree on papers in my work with the forest package for LaTeX. So far, I have the following code: \begin{forest} for tree={grow=0, s sep=0pt,...
3
votes
1answer
66 views

Tikz-tree merging/recombining nodes

I need to draw a binomial tree, where nodes with the same value are merged together. Example: (But instead from left to right, I want it to be from up to down). Is there a way to do this with tikz-...
1
vote
1answer
73 views

Rooted trees with labelled leaves

I am trying to draw something like this using the forest package: how do I draw a tree with circles at every node in a way that I can still label the leaves? is there a way to add dots between ...
1
vote
2answers
63 views

how can I make a vertical and reverse decision tree in tikz

I am trying to make a vertical "reverse" decision tree inspired on this. This is my trial: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{tikz} \...
1
vote
1answer
43 views

Binary tree layout removes duplicate branches

What I want to do is draw a tree that doubles in size on each layer, so I thought a binary tree would be the right solution, as of right now I have the following code: \documentclass[a4paper, 12pt]{...
1
vote
1answer
55 views

Arrow diagrams using packages

Is there a way to draw a diagram like such using only default provided packages? The part that I'm trying to figure out is creating an arrow that points above an element, like the right-most arrow in ...
1
vote
0answers
64 views

Chessboard tree diagram

I'm wanting to draw a chessboard tree diagram and I am trying to find the best way to create the tree diagram part. So far I have the below but it looks like the chessboard has a white border which is ...
1
vote
1answer
33 views

How can I center this rather uneven parent node around its dashes?

My question is: given the tree in question, how can I centre its parent node around its dashes? This is a sample of a much bigger, and complex, genealogical tree I am trying to build. I would very ...
1
vote
1answer
47 views

How to create trees with Qtree and math symbols

Hi I am trying to create a tree with two branches R<1 , R>1, which are labeled by math symbols (indices, \leq, ...). The second branch must be developed further. This almost works \...
0
votes
1answer
43 views

Why are lines appearing away from TikZ graph?

I'm trying to connect the ends of child nodes in TikZ. The lines form the correct shape (it should look like a triangle), but they are appearing weirdly displaced. I want the lines to connect the ...
0
votes
0answers
45 views

Tree with lines in latex [duplicate]

How can i input this on latex? I tried but the space is too hard to input and also the line is hard to input \documentclass{article} \usepackage{bussproofs} \begin{document} \begin{prooftree} \AxiomC{...
1
vote
2answers
45 views

How to add children to previously-declared nodes using TikZ?

Here is a simple TikZ tree: \begin{tikzpicture} \node {root} child {node {left}} child {node {right} child {node {child}} child {node {child}} }; \end{tikzpicture} In this ...
1
vote
1answer
42 views

Fix overlap Decision Tree

Can please help me in fixing the overlap in the decision tree. Can you suggest a better code? \documentclass[border=10pt]{standalone} \usepackage{tikz} \tikzset{ treenode/.style = {shape=rectangle, ...
0
votes
0answers
25 views

Horizontal hierarchy tree with group labels (labeled hierarchy)

My question is very similar to that of this question, however I am trying to add the group labels like this and this. I found that this question has group labels similar to what I am after, but am ...
0
votes
0answers
63 views

tikz - reproducing tree / diagram from spreadsheet

How can I reproduce diagram from screenshots below using TikZ (in version with arrows or curly brackets)? I've tried creating tree in TikZ using split rectangle nodes, but I couldn't add children to ...
-1
votes
1answer
69 views

Typesetting tree with groups of nodes

How can I create a tree in which some of nodes are in groups so there is no space in between them and only one arrow connects parent and whole group, but I can still add child nodes (of the same style)...
0
votes
1answer
79 views

Paint the tree with the following design

I know that is better to report some code to help the community to understand what is my problem, but I need to reproduce the following Figure, with the array reported below I want refactoring my ...
1
vote
1answer
88 views

Aligning Paths Coming from Single Node in Forest

So, I am fairly new to using Forest, and I'm finding it rather difficult to wrap my head around the package. I'm currently trying to make a tree with paths that curve towards the horizontal when ...
2
votes
1answer
101 views

How do I create a prooftree with aligned indices for modal logic formulas?

This is my first question on TeX.SE. I need to typeset several dozen modal logic trees; unlike typical first-order trees these require an additional index to indicate worlds in the model. Here is a ...
0
votes
1answer
130 views

Copy the Merge sort recursion tree from tikz example with forest package

I'm trying to explain the execution time of an algorithm and I'm using the forest as a package to drawing tree, and with this post, I'm asking if is possible to draw the same tree in the figure below ...
0
votes
1answer
33 views

Paint different path on the tree with forest package

I need to paint a different path on the tree to figure two different situations that happen on the tree. In particular, I'm able to figure the travers tree with a forest, as the figure below, and this ...
0
votes
1answer
74 views

Length of branches in forest (LaTex)

I've written this tree using the Forest package. The output is perfect, but I don't understand why in order to increase the length of the branch connecting r, I had to write [h, l=2] and not [r, l=2]. ...
0
votes
1answer
44 views

How to align nodes using forest package, tikz tier

I've created the following tree using the forest package. However I cannot understand how to align m,n,S,F and L. I used a previous question (Tier in Forest tree- how to align properly) to try to fix ...
2
votes
1answer
57 views

Tier in Forest tree- how to align properly

I've create this tree in LaTex using the package forest. However, I cannot understand why the command tier doesn't work properly. I should have F, P, D and R align on the same line and M, S and L on a ...
0
votes
1answer
68 views

Fix the stemma codicum (forest tree)

I created the following tree in LaTex using the forest package. However, there are still a couple of things that I cannot manage to fix. Could you please help me? Thank you in advance! \documentclass[...
2
votes
1answer
110 views

Nice alignment across nodes in logic proof trees typeset with forest

In this answer, user cfr offers the following code which gives output as in the following image: \documentclass[border=11pt]{standalone} \usepackage[linguistics]{forest} \usepackage{amsmath,amssymb} \...
2
votes
1answer
74 views

Dimension too large when using forest package - too many null nodes?

When I use the following code \documentclass{article} \usepackage[edges]{forest} \begin{document} \begin{forest} for tree={ grow'=east, anchor=west, font=\itshape, forked edge, ...
1
vote
1answer
38 views

How to eliminate space for a null node in a tree

Using the forest package, I using the following code \begin{forest} for tree={ grow'=east, anchor=west, node options={font=\itshape, align=center, }, ...
1
vote
1answer
90 views

Hierarchical block diagram

I've tried to use the forest package to make a 'hierarchical block diagram' like this. It seemed that my effort can never meet my goal. I also tried Visio, and it didn't work well. So I came back to ...
0
votes
0answers
33 views

Connecting two nodes in a Tree [duplicate]

I'm trying to make a simple line connecting the same node. I'm using a simple qtree package. Here is what I have so far. \Tree [.\textit{sign} [.\textit{syn-sign} \textit{phrase} ] [.\textit{lex-sign}...
-2
votes
3answers
109 views

How can I draw a tree like this?

I cannot figure out how to add the boxes with numbers in them. I've tried using forest and tikz but was not able to do this. I was able to draw a tree structure easily, but that's it.
0
votes
2answers
87 views

Binomial tree using TikZ

I'm trying to reproduce the following binomial tree using TikZ: I can't find the right proportions for the tree itself, it seems a little bit asymmetric. My minimal code: \documentclass{article} \...
0
votes
3answers
149 views

Change node size of a tree

I have this tree: That was created with this code: \begin{figure}[h] \centering \begin{tikzpicture} \node[circle,draw]{} child{ node[circle,...
0
votes
0answers
37 views

Write macro to create a recombinant binary tree with the forest package

Below I show how I can use the forest package to create a recombinant binary tree by drawing some edges manually. How can use the forestset macro to achieve the same result, without the need to add ...
0
votes
1answer
52 views

How can label an edge of a tree which was manually added?

One can use TikZ to create a tree manually , or use the forest package to make the process easier. Below I show how I can use the forest package to create a binary tree, and turn it into a recombinant ...
1
vote
1answer
57 views

Use \forestset macro to automatically turn on math-mode in each node, and color the 2nd component of every couple?

I want to produce a binary tree, where at each node I will enter a couple (e.g. $(8,16)$ or $(S_2,M_2)$), and the second component is colored red. How do I use the \forestset macro (from the forest ...
1
vote
2answers
255 views

Forest package: How to use \forestset in the preamble?

I'm trying to automate the layout for certain trees that I wish to use repetitively, but I don't seem to be able to get the \forestset command to work in the preamble. In the codes below, I suppose ...
0
votes
1answer
46 views

Changing the distance between nodes in a tree

I have used the qtree package to write the following tree: \Tree[.F [.F[0] [.F[0][0] {[x, y, z]} ] [.F[0][1] {[x, y, z]} ] {\ldots} ...

1
2 3 4 5
11