1

I tried to draw this diagram and did it differently; however, when added to my book template, it went outside, so I tried to show a standalone, and it looked cropped. How can I:

  1. fix the cropping of the diagram
  2. improve it to make it look closer to the original, or is it currently acceptable?

The original diagram enter image description here

My version of the diagram enter image description here

My Code

\documentclass[preview]{standalone}
\usepackage{smartdiagram}
\usesmartdiagramlibrary{additions} 
\usetikzlibrary{arrows,quotes,calc,decorations.text,positioning} 
\begin{document}
    \begin{figure}[h]
        \centering
        \smartdiagramset{uniform color list=teal!60 for 7 items,
            module x sep=3.75,
            back arrow distance=0.75,
            sequence item border color=black,
            uniform arrow color=true,
            arrow color=gray!50!black,
            circular distance=5cm,
            font=\large,
            text width=2.5cm,
            module minimum width=2.5cm,
            module minimum height=1.5cm,
            arrow line width=2.5pt,
            arrow tip=to,
        } 
        \smartdiagramadd[circular diagram:clockwise]{
            Designing \& manufacturing,Distribution,Consumption \& Use,Disposal, Recycling,Raw material processing
        }
        {}
    \begin{tikzpicture}[overlay]
        \draw[stealth-,
        line width=1mm,
        red!40,
        dashed,
        postaction={decorate,
            decoration={text along path,
                text align={left indent={.1\dimexpr\pgfdecoratedpathlength\relax}},
                text={Landfill},
                raise=5pt}}] 
        ([xshift=-4cm,yshift=-2cm]module5.south) to[out = 0, in = 270, looseness = 1.91] (module5.south);
        \draw[-stealth,
        line width=1mm,
        red!40,
        dashed,
        postaction={decorate,
            decoration={text along path,
                text align=center,
                text={Renewable resources},
                raise=5pt}}] 
        (module5.south west) to[out = 225, in = 180, looseness = .975] (module6.west);
        \draw[stealth-,
        line width=1mm,
        red!40,
        dashed,
        postaction={decorate,
            decoration={text along path,
                text align=center,
                text={Non-renewable resources},
                raise=5pt}}] 
        ([xshift=-6cm,yshift=-2cm]module1.south) to[out = 0, in = 180, looseness = 1.1] (module1.west);
        \draw[-stealth, %bend left=15
        line width=1mm,
        red!40,
        dashed,
        postaction={decorate,
            decoration={text along path,
                text align=center,
                text={Manufacture and refurbish},
                raise=5pt}}] 
        ([xshift=.5cm]module5.north west) to[bend left=15,out = 105, in = 205, looseness = .75] ([xshift=.5cm]module2.south west);

        \draw[-stealth,
        line width=1mm,
        red!40,
        dashed,
        postaction={decorate,
            decoration={text along path,
                text align=center,
                text={Share},
                raise=5pt}}] 
        (module3.south west) to[out = 225, in = 135, looseness = 4] (module3.north west);

        \draw[-stealth,
        line width=1mm,
        red!40,
        dashed,
        postaction={decorate,
            decoration={text along path,
                text align={left indent={.45\dimexpr\pgfdecoratedpathlength\relax}},
                text={Reuse and redistribute},
                raise=5pt}}] 
        ([xshift=-.75cm]module3.south) to[out = 270, in = 240, looseness = 3] (module2.south);

        \draw[stealth-,
        line width=1mm,
        red!40,
        dashed,
        postaction={decorate,
            decoration={text along path,
                text align=center,
                text={Repair product life extension},
                raise=-15pt}}] 
        (module2.north east) to[out = 75, in = 315, looseness = 1.75] (module3.south east);

% \draw[help lines, gray, dashed, step=1] (0,0) grid (14,12); \end{tikzpicture}
\end{figure} \end{document}

OOzy Pal
  • 1,571

3 Answers3

5

Here's an idea to almost draw the original diagram with TikZ.

Unfortunately, the Triangle Cap arrow tip isn't implemented for double lines though we can just tinker around with two separate paths where the inner one is also used for the text along path decoration.

This uses one loop where we specify two variables in each item: the angle it should use and the text. The angles should sum up to 360. The PGFMath functions (but they are constants) R, startInd and totalInd are used to change the radius or the indentations for the inner arrow. I'm not interested in doing trigonometry so feel free to adjust those so that the arrows look good.

For the connections between the circular arrows, I'm using Arc coordinates i styles to insert coordinates for each arc. This is very tedious input though we could just spread five or ten for each arc even if we don't use each.

As an example I made one connection from Disposal to Design & Manfacturing. Doing the connection exactly as in the preview isn't straight forward since it covers the target and uses a very specific arrow tip which isn't available by stock TikZ (but might be possible with a harpooned Triangle tip).

Code

\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta, backgrounds, bending, decorations.text, quotes}
\begin{document}
\begin{tikzpicture}[
  Every Arc/.style={
    arrows=[bend], Triangle Cap[reversed]-Triangle Cap},
  every Arc/.style ={Every Arc, line width=10mm},
  every Arc'/.style={
    Every Arc, line width=9mm,
    /utils/exec=\pgfmathsetmacro\c{#1/10*100+20}, draw=white!\c!black},
  text decoration/.style={decoration={
      name = text along path, text={#1}, raise=-.35em, text align={align=center}}},
  decoration={text color=white},
  Arc 1'/.style={decoration=reverse path},
  Arc 2'/.style={decoration=reverse path},
  Arc 6'/.style={decoration={reverse path, text color=black}},
  declare function={R=5; startInd = 1.5; totalInd = 2.5;},
  radius = R,
  Arc coordinates 1/.style={insert path={coordinate[midway] (Arc-1)}},
  Arc coordinates 4/.style={insert path={coordinate[near end] (Arc-4)}},
]
\sffamily
\foreach[
  count=\i from 1,
  remember=\ARC as \prevARC (initially 290),
  ] \ARC/\TEXT in {
  40/DISPOSAL,
  45/RECYCLING,
  80/RAW MATERIAL PROCESSING,
  75/DESIGN {\&} MANUFACTURING,
  45/DISTRIBUTION,
  75/CONSUMPTION {\&} USE}{
  \draw[every Arc=\i, Arc \i/.try]   (\prevARC         :R) arc [start angle=\prevARC,          delta angle=-\ARC         ];
  \draw[every Arc'=\i, Arc \i'/.try] (\prevARC-startInd:R) arc [start angle=\prevARC-startInd, delta angle=-\ARC+totalInd]
    [sloped, allow upside down, nodes={yshift=+-5mm}, Arc coordinates \i/.try]
    [postaction=decorate, text decoration/.expand once=\TEXT];
  \pgfmathsetmacro\ARC{\prevARC+-\ARC}
}
\scoped[
  on background layer,
  every edge/.append style={line width=4mm, line cap=rect, postaction=decorate},
  arrows={-Triangle Cap[cap angle=30, sep=+1mm, bend]},
  edge quotes mean={text decoration={#1}}
] \small
  \path (Arc-1) edge[bend left=60, "remanufacture {\&} refurbish"] (Arc-4)
;
\end{tikzpicture}
\end{document}

Output

enter image description here

Qrrbrbirlbel
  • 119,821
  • The sloped, allow upside down, nodes={yshift=+-5mm} makes it so that all coordinates are placed on the inside of the circular arrows (5mm is half the line width). The coordinates on the other side need yshift=+10mm to counteract this or all this should be done with left with offset and right with offset. – Qrrbrbirlbel May 12 '23 at 14:11
  • I liked the drawing of the circle, but it was tough for me to draw the arrows. So I reverted to normal arrows. I will post my code. – OOzy Pal May 14 '23 at 04:47
3

enter image description here

My code

\documentclass[tikz]{standalone}
\usetikzlibrary{arrows.meta, backgrounds, bending, decorations.text, quotes}
\begin{document}
\definecolor{vcolor}{rgb}{0,0.5,0}
\begin{tikzpicture}[
    Every Arc/.style={
        arrows=[bend], Triangle Cap[reversed]-Triangle Cap},
    every Arc/.style ={Every Arc, line width=10mm},
    every Arc'/.style={
        Every Arc, line width=9mm,
        /utils/exec=\pgfmathsetmacro\c{#1/10*100+20}, draw=green!\c!blue},
    text decoration/.style={decoration={
            name = text along path, text={#1}, raise=-.35em, text align={align=center}}},
    decoration={text color=white},
    Arc 1'/.style={decoration=reverse path},
    Arc 2'/.style={decoration=reverse path},
    Arc 6'/.style={decoration={reverse path, text color=black}},
    declare function={R=5; startInd = 1.5; totalInd = 2.5;},
    radius = R,
    Arc coordinates 1/.style={insert path={coordinate[midway] (Arc-1)}},
    Arc coordinates 2/.style={insert path={coordinate[pos=.2] (Arc-2)}},
    Arc coordinates 3/.style={insert path={coordinate[pos=.8] (Arc-3)}},
    Arc coordinates 4/.style={insert path={coordinate[near end] (Arc-4)}},
    Arc coordinates 5/.style={insert path={coordinate[near end] (Arc-5)}},
    Arc coordinates 6/.style={insert path={coordinate[near end] (Arc-6)}},
    ]
\draw[-stealth,
line width=1mm,
vcolor,
dashed,
postaction={decorate,
    decoration={text along path,
        text align={center},text color=black,
        text={Renewable resources},
        raise=5pt}}] 
(-4,-3.8) to[out = 225, in = 135, looseness = 2] (-5.1,2);
\draw[-stealth,
line width=1mm,
vcolor,
dashed,
postaction={decorate,
    decoration={text along path,
        text align=center,,text color=black,
        text={Renewable resources},
        raise=5pt}}] 
(2.1,-3.9) to[out = 150, in = 180, looseness = 1.25] (4.3,1.2);
\draw[-stealth,
line width=1mm,
vcolor,
dashed,
postaction={decorate,
    decoration={text along path,
        text align=center,,text color=black,
        text={Repair product life extension},
        raise=5pt}}] 
(2.5,-3.75) to[out = 150, in = 165, looseness = 1.25] (4.5,-.1);
\draw[-stealth,
line width=1mm,
vcolor,
dashed,
postaction={decorate,
    decoration={text along path,
        text align=center,,text color=black,
        text={Share},
        raise=5pt}}] 
(2.75,-3.5) to[out = 150, in = 150, looseness = .875] (4.35,-1.1);
\draw[-stealth,
line width=1mm,
vcolor,
dashed,
postaction={decorate,
    decoration={text along path,
        text align=center,,text color=black,
        text={Manufacture and refurbish},
        raise=5pt}}] 
(0,-4.425) to[out = 135, in = 200, looseness = 1.02] (1,4.4);
\draw[stealth-,
line width=1mm,
vcolor,
dashed,
postaction={decorate,
    decoration={text along path,
        text align=center,,text color=black,
        text={Landfill},
        raise=5pt}}] 
(-6,-6) to[out = 5, in = 200, looseness = 1.502] (-3,-4.5);
\draw[stealth-,
line width=1mm,
vcolor,
dashed,
postaction={decorate,
    decoration={text along path,
        text align=center,,text color=black,
        text={Non-renewable resources},
        raise=5pt}}] 
(-7.5,6) to[out = 5, in = 180, looseness = 1.50] (-3.75,4);
        \draw[step=1.0,black,thin] (-8,-8) grid (8,8);
\sffamily
\foreach[
count=\i from 1,
remember=\ARC as \prevARC (initially 290),
] \ARC/\TEXT in {
    40/DISPOSAL,
    45/RECYCLING,
    80/RAW MATERIAL PROCESSING,
    75/DESIGN {\&} MANUFACTURING,
    45/DISTRIBUTION,
    75/CONSUMPTION {\&} USE}{
    \draw[every Arc=\i, Arc \i/.try]   (\prevARC         :R) arc [start angle=\prevARC,          delta angle=-\ARC         ];
    \draw[every Arc'=\i, Arc \i'/.try] (\prevARC-startInd:R) arc [start angle=\prevARC-startInd, delta angle=-\ARC+totalInd]
    [sloped, allow upside down, nodes={yshift=+-5mm}, Arc coordinates \i/.try]
    [postaction=decorate, text decoration/.expand once=\TEXT];
    \pgfmathsetmacro\ARC{\prevARC+-\ARC}
}

\end{tikzpicture}

\end{document}

OOzy Pal
  • 1,571
2

The answer below uses the wheelchart package, which I wrote.

The text in the arcs is given to the key arc data. The direction of this text depends on the angle of the middle of the arc given by \WCmidangle which is used in the key arc data dir. This text is centered in the arc with arc data pos=0.5.

The gaps between the arcs are obtained with the key gap.

The arrow is obtained with the key slices arrow.

The length of the arrows depends on the width of the text using the key value=width("\WCvarA").

enter image description here

\documentclass[border=6pt]{standalone}
\usepackage{wheelchart}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}
\sffamily
\wheelchart[
  arc data=\WCvarA,
  arc data angle shift=6,
  arc data dir={\WCmidangle<180?1:-1},
  arc data pos=0.5,
  arc data style={text color=white},
  data=,
  gap,
  radius={3}{4},
  slices arrow={1}{0},
  slices style={
    fill=white!\fpeval{(\WCcount/\WCtotalcount)*70}!black,
    draw=black
  },
  start angle=-75,
  value=width("\WCvarA")
]{%
  Disposal,
  Recycling,
  Raw material processing,
  Design {\&} manufacturing,
  Distribution,
  Consumption {\&} Use%
}
\end{tikzpicture}
\end{document}
matexmatics
  • 4,819