-2

How can I draw picture like this in Latex?

Any pointers welcome.

enter image description here

Torbjørn T.
  • 206,688
Exploring
  • 469
  • See forest package. Its documentation contain examples with similar trees. – Zarko Nov 09 '21 at 20:38
  • 2
    @downvoters: Please don't downvote below a score of -1, even if the question in its current form needs some improvement. A score of -1 is enough to show that the question needs work, anything below that is of no use. Also, if you downvote or vote to close, please leave a comment explaining why you did so, but wait at least 24 hours after asking the OP for improvements to the question before voting to close. – Mensch Nov 14 '21 at 20:47
  • @Exploring To explain the downvoting: we generally prefer that questioners have tried to solve their problems and not just turn to TeX.SE as a coding service. If you need a starting point, most web searches would be able to do that. If you've already made a start and gotten stuck, then it would be best if you showed us what you have so far, and what part you're stuck on. – Teepeemm Nov 27 '21 at 02:03

1 Answers1

1

You can do something similar with the tikz package using tikzstyle to define how you want things to look.

Add to your preamble:

\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}
\tikzstyle{block} = [rectangle, rounded corners, minimum width=3cm,
 minimum height=1cm,text centered, draw=red, fill=white]
\tikzstyle{arrow} = [thick,->,>=stealth]

The third line defines the shape of our blocks. The fourth line defines the shape of our arrows.

To draw a diagram:

\begin{tikzpicture}[node distance=2cm]
\node (start) [block] {Start};
\node (stop) [block, below of=start] {Stop};
\node (other) [block, right of=stop, xshift=2cm] {Other};
\draw [arrow] (start) -- (stop);
\draw [arrow] (start) -- (other);
\end{tikzpicture}

A node works like this:

\node (label) [style] {Text};

The label gives you a way to refer to it, such as when you are drawing arrows. The style comes from the tikzstyle that you defined in your preamble, and the Text is the actual text you want to appear in your box. (Don't forget the closing semicolon.)

This will give you:

Simple trees diagram

Edit: There are other examples here.