Questions tagged [trees]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
51 views

Is there a way to factorize the tree decoration of several trees?

I have a LaTeX document with several trees made with the forest package and would like to define a decoration style for these trees in a way that avoids code duplication. In other words, I would like ...
4
votes
2answers
77 views

Tree in Diagram not centered

while the diagram seems to be centered (as seen by the caption), the tree inside is not. The narrower the tree, the farther to the right it is positioned. Any thoughts? Here's my code \...
4
votes
1answer
192 views

Table right of horizontal forest

I'm trying to make a table just right of my forest corresponding to the last link in my forrest. My forest looks like this: \documentclass[12pt,a4paper,twoside]{report} \usepackage{forest} \begin{...
4
votes
3answers
506 views

Label Imperfect Information dashed line in tree

I am trying to add two labels, one over each of the two dash lines. Each time I add some variation in code at the place I created the lines, the corresponding label shows up at the top of the figure. ...
4
votes
2answers
1k views

Colouring the branches of tikz trees

I want to colour the branches of the following tree: \documentclass[12pt,a4paper]{article} \usepackage{tikz-qtree} \usepackage{tikz-qtree-compat} \tikzset{every tree node/.style={align=center,...
4
votes
1answer
1k 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 \...
4
votes
2answers
584 views

How to generate labels next to junctions and avoid self-collision with tikz?

I have an ASCII-art phylogenetic tree that looks (in part) like /------ PLN /-----+ 0.9 | \------ IL1 /--------+ 1.8 | | /----- PVD | ...
4
votes
1answer
2k views

Arrows in tikz-qtree with symbols in node names

I have a syntax tree with angle brackets to represent movement: \begin{tikzpicture} \Tree [ .TP [ .T' \node{T+verb}; [ .vP \qroof{`ana}.DP [ .v' \node{v+{\textlangle}verb{\...
4
votes
1answer
2k views

adding a node to a qroof in tikz-qtree

I need a node in the head element of a qroof in tikz-qtree (using tikz-qtree-compat). I need the 'np' to be a node so I can draw an arrow to it. However, the following breaks: \documentclass[10pt]{...
4
votes
2answers
123 views

Forest: How do I automatically align tiers and have parent anchor=south

I am trying to make basic linguistic trees in Forest that do two things: 1) have the bottom leaves aligned on a single tier, and 2) have parent anchor=south. (Actually I have a third requirement as ...
4
votes
1answer
88 views

Triangle tree with node positioning

I am trying to recreate the image shown below. While the numbers are blurry that is not relevant. The relevant part is making the tree look like a triangle. Here is how far I have gotten What is ...
4
votes
1answer
976 views

TikZ/PGF error when using forest

I am trying to make a linguistics tree using the forest package, as in the second example in this thread. I was able to generate the tree for the most part, but I cannot draw the triangle for some ...
4
votes
3answers
407 views

Alignment in directory tree

I want to draw a directory tree, see the code below. I can't get the alignment right in the following areas: The H of Here is text and the T of This is some more text must align. All horizontal ...
4
votes
1answer
3k views

Package pgf Error: No shape named is known

I have encountered a problem Package pgf Error: No shape named is known but, I do not know what's wrong with it and how to fix it? Can anybody help me? My code is as follows: \documentclass{...
4
votes
2answers
2k views

[Tikz-]Qtree: force direction of single child to left or right?

I'm trying to draw a tree that has internal nodes with only one child, but which must be oriented. / \ /\ \ /\ Instead of the typical qtree where said children just "hang": ...
4
votes
2answers
907 views

Tree in a graph's node

I am trying to figure out how I can draw a tree in a graph's node with tikz. Meaning, the node is not supposed to have a value or name but a tree inside of the circle around it. I tried the following ...
4
votes
1answer
138 views

How to add multi-line text below a node in a tree in forest

I want to make a tree which has bulleted lists centered below the child nodes, like so: I've searched on TeX SE and found questions which describe putting labels below nodes, but it doesn't quite ...
4
votes
1answer
36 views

How do I add labels to node connectors in a tree diagram using TikZ

I would like to add the labels "H" and "L" to the X and Y connectors like those included below the Z nodes. Here is my code so far: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \...
4
votes
1answer
235 views

forest: Draw a roof over multiple children in forest?

I often want to draw schematic trees like the following. These don't work with the current roof option in forest because I often need the roof to extend over multiple nodes. It looks like the ...
4
votes
1answer
164 views

Use a symbol in a node as anchor

Is it possible to use a symbol in a node as an anchor? I want to draw lines from the \circ symbol in a parent to the childs. I want to do something like for tree={parent anchor=\circ, child anchor=...
4
votes
1answer
154 views

Forest tree not symmetric

I'm new to the forest package and created a tree with a node between two nodes, that is not centered. In the picture, it's the ZS(A; C) below root. This is the code: \documentclass{standalone} \...
4
votes
1answer
403 views

Time axis for forest phylogenetic tree

I am making a phylogenetic tree with forest, using this question and answer as a guide. I would like to have a vertical axis for time, as shown in the image below but I have two related problems ...
4
votes
1answer
843 views

Putting a tree next to another tree

How can I put example tree (a) and example tree (b) next to each other on the page? At the moment, tree (b) appears below tree (a): \documentclass[12pt,a4paper]{article} \usepackage{tikz-qtree} \...
4
votes
1answer
192 views

How can I set a style in `\forestset` which requires delayed calculations with the results of node walks?

What is the correct way to wrap the specification for the tree below into the my binomial style defined in \forestset and why? The following code works fine: \documentclass[tikz,border=10pt]{...
4
votes
1answer
521 views

Package for energy budget trees

Is there a package that can typeset trees used for energy budgets? The image is an extract from Dynamic Energy and Mass Budgets in Biological Systems by B.Kooijman which is easily identifiable as ...
4
votes
1answer
836 views

How to balance binary branches and repair shorthand triangles in LFG style c-trees using tikz-qtree

I have modified the example from the tikz-qtree documentation to form this LFG style c-tree, but am having difficulty balancing the binary branches in general, and the IP branches and roof/triangle DP ...
4
votes
1answer
173 views

{genealogytree} How to model my Cousins

I am working with the "genealogytree" package for a long time, but im struggling again about modeling my Cousins. After i got Trouble Merging my multiple (completed) Family Trees (Link) with ~150 ...
4
votes
1answer
105 views

Shorter trees with horizontal terminal nodes and empty nodes (with forest)

I'm submitting a computational paper to an ACL-style journal. I need trees that have horizontally-aligned terminal nodes and no node labels (parser doesn't provide them). This question relates to this ...
4
votes
2answers
765 views

Prune a branch in a tree

I would like to prune (for indication) some branches of this minimax tree. I'd like to have a cross line over each branch that would be pruned in the final tree. I cannot seem to be able to do it with ...
4
votes
1answer
618 views

Drawing tree in text (like inline math)

Is there a way to draw (with tikz/tikz-qtree) a tree directly in the text, like the inline math command? For a small tree with 2 or 3 nodes? Thanks!
4
votes
1answer
936 views

Visualizing broad Tikz tree graph

Modules of software I created produce Tikz QTree diagrams for visualisation. The problem is that some trees grow quite broad... Even when I try to massively shrink them by Tikz settings, I cannot fit ...
4
votes
1answer
68 views

How to position a single child node so it is in the same level with parent using forest?

Here is my tree diagram built using forest package. How to move the node in the red pen to the position of the blue pen? Here is my code. \begin{forest} for tree={calign=last}, [HEAD ...
4
votes
1answer
100 views

prooftrees.sty - why are line numbers overlapping and how to avoid?

Why are the "6" and "7" overlapping here and how can I avoid it? \documentclass[border=10pt]{standalone} \usepackage{prooftrees} \begin{document} \begin{prooftree}{} [A [A [A [...
4
votes
2answers
624 views

Align all leaf nodes in tikz-qtree

I am trying to reproduce this graph: I've read in tikz-qtree documentation that I need to compute the size from the root as a multiple of level distance, but I can get it to work. So far I have: \...
4
votes
1answer
748 views

Nodes within leaf text in tikz-qtree?

I'm trying to draw a box around only part of the text in a tikz-qtree tree, but the closest I can do is this: \documentclass{article} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \...
4
votes
1answer
251 views

Odd incompatibility between multi-line forest nodes and tabular

The following MWE compiles just fine: \documentclass{article} \usepackage{forest} \begin{document} %\begin{tabular}{c} \begin{forest} [x\\y, align=center [z] ] \end{forest} %\end{...
4
votes
1answer
3k views

Multipart nodes with multipart subparts — style issue

I want to typeset multipart nodes that have multipart sub parts — similar to the following diagram (from Miller and Ranum) I have tried using TikZ horizontal split rectangles inside vertical split ...
4
votes
0answers
64 views

prooftrees tree nodes on different line

While trying to write a tableaux proof tree with prooftrees, I had some difficulty with putting single and branching nodes on the same line. \documentclass{article} \usepackage{prooftrees} \begin{...
4
votes
0answers
542 views

How to convert Newick tree format to TikZ? [closed]

I need to draw a number of large phylogenetic tree diagrams in a document and it appears that tikz-qtree may be the best package for this task. A manual approach does not seem the best solution to ...
3
votes
3answers
2k views

Why is this tree overlapping and missing edges?

\node [circle, draw] at (6, 0) {63} child{node [circle, draw] (left node) {26} child{node [rectangle,draw] (left node) {A:12}} child{node [circle, draw] (right node) {14} child{...
3
votes
2answers
1k views

Depth-first traversal of a binary tree

How can I achieve the drawing of a depth-first traversal of a binary tree like in this picture ?
3
votes
4answers
579 views

How to colorize only one of the three branches in a game tree?

I am using Osborne's egameps package to create a game tree of an extensive game. How could I colorize only the right branch of the tree branch in the first movement as red. I attempted to use \iiib[][]...
3
votes
2answers
3k views

place several figure into one -tikz

I draw several trees and now I want to place them in a figure ( side by side or one below the other ) \documentclass{report} \usepackage{tikz} \usetikzlibrary{fit,shapes} \begin{document} %...
3
votes
1answer
153 views

How do you use environments that have the same name within a single LaTeX document?

I'm trying to typeset some proof tree exercises. But I need to use the prooftree environment from the bussproofs package, as well as the prooftree environment from the prooftrees package. Is there a ...
3
votes
2answers
884 views

Latex and Game Theory: Combining an Extensive and Normal Form for a Three Players Game

I am having trouble on editing my Latex code to produce a figure (game) using the Tikz package. I am trying to produce a three players game combining an extensive form (for player 3) and two ...
3
votes
2answers
454 views

representing a null child in a binary tree using `ground` symbol

I'm using ground symbol to represent a null child in a binary tree. But the ground symbol has arrows in it. How do I remove them? \documentclass{llncs} \usepackage{llncsdoc} \usepackage{tikz} \...
3
votes
2answers
520 views

Forest tree - how to draw nodes with double border?

I'm looking for something like this (finite automat). I want to draw a specific node as endnode, that means this node should have two circles as border. I'm using forest to draw my trees Currently I'...
3
votes
3answers
482 views

Make large decorated tree diagrams / Multi-line Forest diagrams

I'm looking after a way to create tree diagrams for file format specifications like in the Minecraft Wiki. I tried creating it with Forest and this is what I have at the moment. This solution works ...
3
votes
2answers
1k 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 ...
3
votes
1answer
2k views

How can I reproduce this simple tree diagram?

I would like to create this simple tree diagram in LYX. I tried using forest but I did not figure out how to add text to the different levels and display percentages.