1

Using the following code

\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\usepackage{verbatim}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{arrows, arrows.meta, backgrounds}
\begin{document}
\begin{frame}[t]
\frametitle{tree}
\pgfmathsetmacro{\inct}{1.96}
\pgfmathsetmacro{\inc}{1.2}
\pgfmathsetmacro{\incc}{.3}
\pgfmathsetmacro{\yc}{1.88}
\pgfmathsetmacro{\incyc}{1.1}
\tikzset{cano/.pic={
\draw [red, line width=\inc mm] (0,0) node (o){} circle (\incc) (135:\incc) -- (-45:\incc);
\begin{scope}[on background layer]
\draw [blue, line width=\inc*.8 mm, -latex] ([shift={(90:\incc*1.6)}]o.center) -- +(-90:\incc*4.4);
\draw [red, line width=\inc*.8 mm, -latex] ([shift={(0:\incc*12)}]o.center) -- +(180:\incc*8);
\end{scope}}}%circle arrow no
\vspace {-.8cm}
\begin{tikzpicture}[scale=.9, transform shape]
\node[black] at (0,0) (begin) {Education};
\node[black] at ([shift={(-90:\inct*1)}]begin.center) (nb) {Investment};
\node[black] at ([shift={(-90:\inct*2)}]begin.center) (nc) {New factory};
\node[black] at ([shift={(-90:\inct*3)}]begin.center) (nd) {Local employment};
\node[black] at ([shift={(-90:\inct*4)}]begin.center) (ne) {More tax revenue};
\node[black] at ([shift={(-90:\inct*5)}]begin.center) (nf) {Better public services};
\begin{scope}[yshift=-11.cm]
\foreach \position in {(0,\yc*\incyc*1), (0,\yc*\incyc*2), (0,\yc*\incyc*3), (0,\yc*\incyc*4), (0,\yc*\incyc*5)} \draw \position pic {cano};
\end{scope}
\end{tikzpicture}
\end{frame}
\end{document}

enter image description here

I would like to do the following:

  1. repeating the circle/arrow drawing between the nodes, which does not look symmetric

  2. make the text left aligned, not centered

to look like the following figure

enter image description here

  • You can define a new command then. – user156344 Feb 20 at 10:40
  • @JouleV Would you please tell me how. Thank you – Hany Feb 20 at 10:43
  • I will be out for a while, so I can't provide an answer now. In short, you can define a command like \something (x)--(y); which draws an arrow like that from node (x) to node (y). At last you only have to draw the leftmost arrow. – user156344 Feb 20 at 10:48
2

I use my previous answer on your question:

\documentclass[tikz,margin=3mm]{standalone}
\usetikzlibrary{positioning,calc}
\def\yourcommand (#1); {
    \coordinate (center) at ($(x#1)+(1.7,-1)$);
    \begin{scope}[scale=0.4]
        \draw[line width=.75mm,blue,-latex] ($(center)+(0,1.5)$)--($(center)+(0,-2)$);
        \draw[line width=1.5mm,red] (center) circle (1 cm);
        \draw[line width=1.5mm,red] ($(center)+(135:1)$)--($(center)+(-45:1)$);
    \end{scope}
    \draw[line width=.5mm,red!70!black,latex-] ($(center)+(.75,0)$)--($(center)+(2.5,0)$);
}
\begin{document}
\begin{tikzpicture}[every node/.style={font=\sffamily}]
\foreach \i in {0,...,5} {\coordinate (x\i) at (0,-2*\i);}
\node[right=1cm of x0] (edu) {Education};
\node[right=1cm of x1] (inv) {Investment};
\node[right=1cm of x2] (fac) {New Factory};
\node[right=1cm of x3] (emp) {Local Employment};
\node[right=1cm of x4] (tax) {More Tax Revenue};
\node[right=1cm of x5] (pub) {Better Public Services};
\foreach \i in {0,...,4} {
    \yourcommand (\i);
}
\coordinate (centerleft) at ($(x2)+(-1.25,-1)$);
\draw[line width=.75mm,blue,-latex] ($(x5)+(0.75,0)$) to[out=180,in=-90] (centerleft) to[out=90,in=180] ($(x0)+(0.75,0)$);
\begin{scope}[scale=0.4]
    \draw[line width=1.5mm,red] (centerleft) circle (1 cm);
    \draw[line width=1.5mm,red] ($(centerleft)+(135:1)$)--($(centerleft)+(-45:1)$);
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

Edit 1:

To add text to the red horizontal arrow, we can add more arguments to the command:

\documentclass[tikz,margin=3mm]{standalone}
\usetikzlibrary{positioning,calc}
\def\yourcommand (#1) node[#2] #3; {
    \coordinate (center) at ($(x#1)+(1.7,-1)$);
    \begin{scope}[scale=0.4]
        \draw[line width=.75mm,blue,-latex] ($(center)+(0,1.5)$)--($(center)+(0,-2)$);
        \draw[line width=1.5mm,red] (center) circle (1 cm);
        \draw[line width=1.5mm,red] ($(center)+(135:1)$)--($(center)+(-45:1)$);
    \end{scope}
    \draw[line width=.5mm,red!70!black,latex-] ($(center)+(.75,0)$)--($(center)+(2.5,0)$) node[#2] {#3};
}
\begin{document}
\begin{tikzpicture}[every node/.style={font=\sffamily}]
\foreach \i in {0,...,5} {\coordinate (x\i) at (0,-2*\i);}
\node[right=1cm of x0] (edu) {Education};
\node[right=1cm of x1] (inv) {Investment};
\node[right=1cm of x2] (fac) {New Factory};
\node[right=1cm of x3] (emp) {Local Employment};
\node[right=1cm of x4] (tax) {More Tax Revenue};
\node[right=1cm of x5] (pub) {Better Public Services};
\yourcommand (0) node[right] {Some text};
\yourcommand (1) node[right=1cm] {Dummy text};
\yourcommand (2) node[midway,above] {Hello};
\yourcommand (3) node[below] {Some stuff};
\yourcommand (4) node[above] {Some other stuff};
\coordinate (centerleft) at ($(x2)+(-1.25,-1)$);
\draw[line width=.75mm,blue,-latex] ($(x5)+(0.75,0)$) to[out=180,in=-90] (centerleft) to[out=90,in=180] ($(x0)+(0.75,0)$);
\begin{scope}[scale=0.4]
    \draw[line width=1.5mm,red] (centerleft) circle (1 cm);
    \draw[line width=1.5mm,red] ($(centerleft)+(135:1)$)--($(centerleft)+(-45:1)$);
\end{scope}
\end{tikzpicture}
\end{document}

enter image description here

  • @JouleVThank you very much. Just one more comment, can some variable text be added to the end of the red horizontal arrows! – Hany Feb 20 at 12:48
  • @JouleVas for example \node[xshift=1cm, yshift=-1cm of x0] {Edu poor}; – Hany Feb 20 at 12:55
  • 1
    @Hany See my edited answer. – user156344 Feb 20 at 14:50
  • @JouleVThank you very much. I appreciate your answer and its modification very much. – Hany Feb 20 at 16:37
1

an alternative, with using tikz library arrows.meta (for arrows), matrix (for positioning of nodes) and calc (for drawing of symbols). symbols with arrow are defined as node style using path picture:

edit: adopted to beamer document class. image size is now determined by selection radius of symbol. appropriate values seems to be between 0.15 in 0.35. scaling with scale=... doesn't work.

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, calc, matrix}

\newcommand\ppbb{path picture bounding box}
\begin{document}
\begin{frame}[fragile]
    \begin{tikzpicture}[font=\footnotesize\sffamily,
 short/.style = {shorten <=1mm},
  symb/.style = {minimum size=4*\r cm, 
                 path picture={
                 \draw[line width=3*\r mm,blue,-{Triangle[angle=90:1pt 2]},short]
                        (\ppbb.north) -- (\ppbb.south);
                 \draw[line width=4*\r mm,red] (\ppbb.center) circle[radius=\r]
                            ($(\ppbb.center)+(135:\r)$)--($(\ppbb.center)+(315:\r)$);
                                },
                node contents={},
                pin=0:{#1}},
symb/.default = {},
every pin/.style = {pin distance=13mm,
                    pin edge={line width=2*\r mm,{Triangle[angle=90:1pt 2]}-,red}
                          },
                        ]
\def\r{.25} %by size of symbol you can scale image size
%%%%%%%%%%%%%%%%%%%%%%%%

\matrix (m) [matrix of nodes,
             column 1/.style={anchor=west}]
{
Education                       \\
\node[symb];                    \\
Investment                      \\
\node[symb=some text];          \\
New Factory                     \\
\node[symb];                    \\
Local Employment                \\
\node[symb=another text];       \\
More Tax Revenue                \\
\node[symb=important];          \\
Better Public Services          \\
};
\draw[line width=3*\r mm,blue,rounded corners=8mm,
      -Straight Barb, short]
    (m-11-1.west) -- ++ (-1.2,0) |- coordinate[pos=0.25] (aux) (m-1-1);
\draw[line width=4*\r mm,red] (aux) circle[radius=\r]
                            ($(aux)+(135:\r)$)--($(aux)+(315:\r)$);
    \end{tikzpicture}
\end{frame}
\end{document}

enter image description here

  • @ZarkoThank you very much for your answer. Just two comments please, how to scale the whole drawing down, say by .8. I tried to do it, but I could not. And how can this drawing be put after \begin{frame} – Hany Feb 20 at 17:21
  • @Hany, see edited answer. – Zarko Feb 20 at 18:28
  • @ZarkoThank you very much for your time to develop this nice code. – Hany Feb 21 at 3:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.