I would like to draw a flowchart similar to the one in the picture, but have absolutely no idea as to how go about it. I have only used tikz-qtree for drawing trees thus far, so I would be immensely grateful for any help.
1 Answer
As starting point can serve this illustration (from one of my textbooks):
\documentclass[border=3mm]{standalone}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
for tree={
% style of nodes in the tree
draw, rounded corners, semithick,
font = \scshape\linespread{.84}\selectfont,
top color = teal!10,
bottom color = teal!50,
minimum height = 11mm,
text width = 24mm, text badly centered,
inner sep = 2mm,
% style of tree (edges, distances, direction)
edge = {draw, semithick, -stealth},
anchor = north,
grow = south,
forked edge, % for forked edge
s sep = 8mm, % sibling distance
l sep = 8mm, % level distance
fork sep = 3.5mm, % distance from parent to branching point
}
[kanalsko kodiranje
[ponovno pošiljanje
[tekoče kodiranje]
[kodi s pomnjenjem]
]
[vnaprejšnje popravljanje napak]
]
\end{forest}
\end{document}
Since your flowchart is actually tree diagram, in above MWE for drawing code is used forest
package. Above MWE produce:
Real text in nodes I left to you. Inserting them should be straight forward.
-
Thanks! I do have two problems when I try it though: for one the arrows don't fork with a 90 degree angle, they are just straight lines from one node to another. And second, the boxes don't expand to fit the text. They are all the same size and the text continues outside of the box. Apr 2, 2020 at 10:54
-
1@aktualitaet, your question is not very clear, so I try to reproduce it on nice way (according to my taste). If you not like arrows head, delete
-stealth
option foredge
. if you not like to have the same size of nodes, deletetext width
fromfor tree
options. Arrows are always for for 90 degree!– ZarkoApr 2, 2020 at 11:02