2

How can I get the following figure using Tikz environment please? blocs, arrows,color

1
  • @Psychonaut, not much, ... made a sketch as many others, when ask the first question here, however, I have in mind similar question where we hadn't be so rigorous and down vote the question.
    – Zarko
    Nov 27, 2015 at 20:12

2 Answers 2

4

An alternative starting point to make own solution. To understand code, I suggest you to read TikZ manual, chapter: "TikZ ist kein Zeichenprogram".

enter image description here

\documentclass[tikz, border=2mm]{standalone}
    \usetikzlibrary{arrows.meta, positioning}

\begin{document}
    \begin{tikzpicture}[
node distance = 12mm,
   box/.style = {draw, rounded corners, minimum width=22mm, minimum height=9mm,
                inner sep=2mm},
   arr/.style = {draw=gray, ultra thick,-{Triangle[fill=gray]},
                 shorten < = 2mm, shorten > = 2mm}
                        ]
\node (n1)  [box]               {Text 1};
\node (n2)  [box,right=of n1]   {Text 2};
\node (n3)  [box,below=of n1]   {Text 3};
\node (n4)  [box,below=of n2]   {Text 4};
%
\draw[arr]  (n1) edge (n2)  (n1) edge (n3)  (n2) edge (n4)  (n3) edge (n4);
    \end{tikzpicture}
\end{document}
0
5

There are several answers of how you can position nodes relatively. I would choose this way.

Since I am not allowed to comment, I added an answer with a little example code.

The basic idea is to start with one node at a random place, give it a label (1) and position all other nodes relative to this one. Also I used a style to define the size and the dimensions.

Since I do not know how much to explain, please ask if something is not clear.

\documentclass[tikz, border=2pt]{standalone}
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}[
      block/.style = {%
      rectangle,
      minimum width = 2cm,
      minimum height = 1cm,
      node distance = 3cm,
      draw = black,
    }
  ]
  % nodes
  \node[block] (1) at (0,0) {Text 1};
  \node[block, right of = 1] (2) {Text 2};
  \node[block, below of = 2, yshift = 1cm] (4) {Text 4};
  \node[block, below of = 1, yshift = 1cm] (3) {Text 3};

  % lines
  \draw[->] (1) -- (2);
  \draw[->] (2) -- (4);
  \draw[->] (3) -- (4);
  \draw[->] (1) -- (3);
\end{tikzpicture}
\end{document}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .