Questions tagged [tikz-trees]
{tikz-trees} is for questions addressing issues related to trees in {tikz-pgf}.
1,256
questions
5
votes
1
answer
231
views
How do I keep my tikz drawing on the page?
I am just learning tikz and I made a picture that I would like to add to a paper I have to write. However, I cannot figure out how to get the figure to center itself on the page. Currently when it ...
0
votes
0
answers
37
views
Mindmap in Tikz, do not draw edge between parent and child in a path
I have a path in a mindmap (see second example) where I would like to not draw one edge between parent and child.
Starting from this
How to set style of a single edge in the tree (TikZ) ? I played ...
0
votes
1
answer
28
views
How do I place two different figures next to each other at the same height?
\begin{figure}[htbp]
\begin{forest}
for tree={circle, fill, s sep=1cm,inner sep=1.5pt}
[[[[][]][[][[][]]]][[][[][]]]]
\end{forest}
\hfill
\begin{tikzpicture}[>=Stealth,->]
\matrix [matrix of ...
0
votes
1
answer
58
views
Adding colour to a phylogenetic tree and using different data
I am posing the question from the one I had asked previously:
Any new and nice way to plot phylogenetic tree in LaTeX from an external csv file?
I had calculated a new tree from a subset of the ...
0
votes
2
answers
47
views
Cannot write \Cup in tikz-qtree binary tree structure in LateX
I stumbled upon this problem while trying to create a LateX binary tree in my Overleaf project. Through online tutorials, I found out how to construct said binary tree through the tikz-qtree package ...
2
votes
1
answer
57
views
How to make tikz trees with children that grow down then right?
by default tikz grows trees in a centered manner, such that children grow as:
o
/ \
o o
/ \ / \
o o o o
How can I grow the trees such that they grow down, then right? Such that:...
3
votes
3
answers
155
views
Construct an infinite tree with dots
Suppose at some point I want to replace nodes and edges by vertical dots if the tree is very big. Is there a possible way to do that with Tikz?
Latex code:
\documentclass{article}
\usepackage{graphicx}...
4
votes
1
answer
59
views
Change line length between parent/child in forest
Consider the following forest:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
forked edges,
for tree={fork sep=2mm,
grow=east,...
2
votes
1
answer
59
views
Increase line length in tikz forest
Suppose I have the following tree:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
for tree={
grow=east,
parent anchor=...
0
votes
0
answers
29
views
how to create trees like this in tikz? (or some other packages? and what libraries are the best?) [duplicate]
spesifically with the side arrows and their text
2
votes
2
answers
86
views
Tikzpicture Multi-Edge
I want to create a multigraph. It's correct so far, but I want to have 3 edges from A to the same node B.
This is my latex code:
\begin{tikzpicture}[level distance=1.5cm,
level 1/.style={sibling ...
1
vote
2
answers
102
views
Add Equations to TikZ figure
I would like to:
(A) rotate the tikz figure
(B) add equations below the figure (rotated)
How could I do that? I drew a sketch:
CODE:
\documentclass{article}
\usepackage{forest}
\usetikzlibrary{...
0
votes
1
answer
44
views
TikZ Graph Too Many Lines
I created a tikz graph. There are still some unwanted lines. I get error messages when I delete them. Any recommendations?
\documentclass[tikz,border=10pt]{standalone}
\usepackage{forest}
\...
1
vote
2
answers
98
views
Separate nodes in tikz latex
I want to draw this tree in Latex. It is a graph of a structural proof for some code.
I have tried
\node [draw, circle] {1}
child { node [draw, circle] {2}
child{ node [draw,circle]...
1
vote
1
answer
42
views
I'm trying to bulid a game tree with TikZ, but the bottom node will not work. Any suggestions?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\begin{tikzpicture}[scale=1, level distance=2.5cm,
level 1/.style={sibling distance=4.5cm},
level 2/.style={...
1
vote
1
answer
42
views
Tikz-qtree lines to the right direction are not straight with multiline texts
I have this following tex document:
\documentclass[10pt]{article}
\ExpandArgs{c}\newcommand{new@fontshape}{anything}
\usepackage{linguex}
\usepackage[russian,indonesian]{babel}
\usepackage[none]{...
4
votes
1
answer
243
views
Decision of tree
I trying to reproduce this tree of decision and I'm having some problems.
That's what I tried
\documentclass{article}
\usepackage{tikz,forest}
\usetikzlibrary{arrows.meta}
\tikzset{% common styles of ...
1
vote
1
answer
46
views
Draw a One-period binomial asset pricing model with continuous dividend
I've copied the code below to draw the tree above:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[column sep=3cm, row sep=0mm, arrows={-Stealth}, cells={nodes={fill, ...
-1
votes
1
answer
99
views
Creating a Disjoint Sets Data Structure Diagram in TikZ
I'm currently studying the CLRS textbook on algorithms and I've come across a figure representing disjoint sets as a collection of trees, where each tree represents a set. I'm looking to recreate a ...
0
votes
3
answers
63
views
Forrest tree with nodes having text and images
Found the answers I needed here....what a prompt, helpful community! Thank you all.
I am trying to recreate this plot from MS Word
How does one create a node with wrapped text and an image below it?
...
5
votes
3
answers
952
views
recreate a figure with TikZ from an entrance exam
Could anyone help me recreate this image on tikz? I don't really know where to start
1
vote
2
answers
72
views
Equal distances between nodes of a tree in each level
I have a tree but want that the distances between rectangles at each level to be equal (equal spaces between rectangles at each level). The idea for the tree was taken here: Adding additional directed ...
3
votes
3
answers
164
views
I am drawing a cycle in TikZ, need to add integer labels on the outside of each node
Here is what I have so far:
\begin{tikzpicture}
\tikzstyle{every node}=[draw, circle, fill=black, inner sep=0pt,
minimum size=5pt]
\tikzstyle{every path}=[line width=.75 pt]
\foreach \s in {1,...,5}
{...
3
votes
2
answers
134
views
Tree Diagram Spacing Tikz
I am having trouble fixing the spacing of my tree.
Currently, I have the following code and result:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees, arrows}
\begin{document}
\...
0
votes
2
answers
96
views
How to draw a network of nodes in latex like below?
this is the network of fifteen nodes. I don't know how to draw using latex. I tried the following code for five nodes.
\begin{tikzpicture}
\graph[counterclockwise=6,
nodes, nodes={circle,draw, ...
4
votes
4
answers
386
views
Background image behind a LaTeX/TikZ forest node
I use the forest package to draw ancestry trees. I would like to add papyrus scroll-like backgrounds to the nodes. This is the basic example:
\documentclass[]{standalone}
\usepackage{pgfplots}
\...
1
vote
2
answers
73
views
How to break line in a text node in a tikz forest diagram
I need to break line in a node text in a tikz forest diagram. I tried to add \ or \newline in the node text, but that did not work.
Here is the sample code:
\documentclass{article}
\usepackage{tikz}
\...
2
votes
1
answer
95
views
Drawing a basketball using Latex
Could you help me to draw a basketball using latex. I tried this version but it doesn't seem to be working.
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\shad[...
2
votes
2
answers
50
views
Level distance from edges in cyclic tree
\documentclass[png,tikz,border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{trees,decorations,shadows}
% style definitions
\tikzset{level 1/.style={sibling angle=90,level distance=25mm}}
\...
0
votes
1
answer
70
views
Problem with line breaking using \\ in tikz
Here is my code, which was compiled by pdflatex.
\documentclass[11pt]{article}
\usepackage[a5paper,margin=5pt]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{tikz-qtree}
\begin{document}
\begin{...
2
votes
3
answers
179
views
TikZ tree alignment with multiline node labels
I'm trying to create a tree structure in tikZ, it looks not too far away from what I want, but a few problems are there:
The labels are multiline, which seems to somewhat break the alignment of the ...
1
vote
1
answer
42
views
Limit pattern inside tikz node
I want to create a tree in tikz, where I highlight certain nodes using a pattern. However, I want to limit the pattern inside the rectangles such that the text is visible on a white background.
Here ...
3
votes
2
answers
93
views
Add arcs to tree drawn with tikz-qtree
I want to add the green arcs, labels and boxes to this tree. (The labels will be black and red, as in the not quite minimal MWE). I don't need a programmatic solution. I can finish the job if I see ...
2
votes
3
answers
420
views
I want help to finish the tree diagram
Question: I have been trying to complete the tree diagram which I started (see the figure).
Please help.
This is what I have
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{...
10
votes
2
answers
217
views
How to make branches in a game tree parallel?
I created the following game tree:
Here is my code:
\documentclass[leqno, oneside, 12pt]{book}
\usepackage{amsmath}
\usepackage{istgame}
\usepackage{caption}
\usepackage{makecell}
\begin{document}
\...
-3
votes
1
answer
83
views
Probability tree with multiple sources that highlights a specific path [closed]
I am trying to recreate a graphic using latex. I want to create a tree-like shape that also includes the events with 0 probability. It should look similar to
I tried to create this using the tikz ...
0
votes
1
answer
101
views
How to make a figure like this in LaTeX using tikz? [closed]
I would like to make this figure in LaTeX using tikz (the figure is from a book):
I really have no idea where to start and how to do it. Thank you for your help.
1
vote
1
answer
48
views
Increase in Node Size When Line Width Differs in Tree
In an attempt to produce the below image
I have put the following code together:
\documentclass[11pt]{book}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usetikzlibrary{trees,graphs,calc,arrows.meta,...
3
votes
2
answers
248
views
How to center a TikZ tree in a Beamer slide?
I created a tikz tree inside a Beamer slide, using the following code:
\documentclass[aspectratio=54, 10pt]{beamer}
\usetheme[progressbar=frametitle]{metropolis}
\setbeamertemplate{frame numbering}[...
6
votes
3
answers
629
views
B-Tree in TikZ without root node
I'm trying to reproduce the following tree structure with Tikz:
Following several questions here I got the following snippet, which almost does the job, except for the fact that I am not able to ...
0
votes
2
answers
128
views
Romanian vowel sound changes
I am new to LaTeX. This question is tree-related. Are there any TikZ-tree-related questions that can be combined to reproduce this following image?
Original image is from Wikipedia. If it is poorly ...
2
votes
2
answers
74
views
Recreating a Tree With Augmented Difficulty of Adding a Node Halfway Between Two Already Existing Nodes
This is a follow-up question to this, which cfr kindly provided an answer to, and by cfr's recommendation which was produced in response to a comment of mine, I propose it in the format of a new ...
7
votes
1
answer
131
views
Recreating a Tree With the Complication of Placing the Nodes On One Line
I am quite new to TikZ and to be honest to this site (I am writing this question with the aid of a more experienced friend), and I am trying to recreate the ensuing photo
What I have put together so ...
1
vote
1
answer
22
views
position label tree edges using macro
In this tree I want the edge labels horizontally aligned, probably nearer the edges. The tree may not be binary.
I would also like to diminish clutter and save typing by putting
\edge node[auto=...
3
votes
1
answer
87
views
tikz trees: how to move a child node of a tree to the top level?
My latex code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
% draw a ...
2
votes
2
answers
63
views
Tikzpicture: centering transitions' label
How could I center the transitions' labels please?
\documentclass[12pt]{book}
\usepackage[french]{babel}
\usepackage{tikz}
\usepackage{graphicx}
\usetikzlibrary{arrows.meta,arrows,chains,automata,...
0
votes
2
answers
164
views
Probability Tree [closed]
How can I make a probability tree that looks like this
I've checked this LaTeX probability tree
but I can't get it to work with just one child
2
votes
3
answers
156
views
Adding key, adjusting node shape and magnifying a tikz diagram
I wish to reproduce the diagram shown in the picture below:
Below is my MWE which I developed by imitating the solution provided at Modifying a decision tree terminal nodes using `tikz`.
\...
5
votes
3
answers
273
views
I want to have exactly 12.5 mm between my figures/tikz figures. How do I do this?
For a project I am supposed to draw different graphs with edges and vertices. One of the points of the project is that the distance between the graphs should exactly be 12.5 mm, but I can't find a way ...
0
votes
1
answer
80
views
Using TikZ to build a genealogy tree, I can not increase the space between node lines between the father and the second wife
I gave up on @thomas-f-sturm's genealogytree library because it does not support the mesh structures.
I migrated to pure TikZ and PGF. I am trying to build a genealogy with paternal and maternal sides,...