1

enter image description hereI am trying to draw some shadowed and colour gradient arrow on the attached file. The last remaining bit is obtaining the same arrow between the second figure referred to as 'NILb.png' in the code and the third figure 'NILc.png' in the code. Of course, you can simply replace the picture loading text in the uploaded code. The arrow can be curved or just with 90 deg turn. I was not able to extend the style to draw this thing. IS there a suggestion to do this? Many thanks in advance. N.B: The figure is repreinted from another reference so kindly bear in mind the statutory rights of the author; W.D. Slafer.

\documentclass{article}
\usepackage{listings}
\usepackage[svgnames]{xcolor}
\usepackage{tikz}
\usepackage{lipsum}
\usetikzlibrary{fadings, shapes.arrows, shadows}
\usetikzlibrary{trees,positioning, graphs, calc}

\tikzfading[name=arrowfading, top color=transparent!50, bottom color=transparent!95]
\begin{document}


\tikz [baseline = (NILa.north), arrowfill/.style={top color=Gray, bottom color=LightGray, general shadow={fill=Gray, shadow xshift=0.3ex, shadow yshift=-0.3ex, path fading=arrowfading}},
arrowstyle/.style={draw=Gray,arrowfill, single arrow, single arrow,
    single arrow head extend=0.2cm}] { %
    %Load the pics from file and align them
    \node[anchor=north west,inner sep=0] (NILa) at (0,0) {\includegraphics[width=0.3\textwidth]{NILa.png}};
    \node[inner sep=0] (NILb) [right =3cm of NILa] {\includegraphics[width=0.3\textwidth]{NILb.png}};
    \path (NILa.south west) -- coordinate (aux) (NILa.south -| NILb.east);
    \path   let 
                \p1=(aux)
            in
            node (NILc) [below] at ($(\x1, \y1-1.5cm)$) {\includegraphics[width=0.3\textwidth]{NILc.png}}
    ;
    %Now I insert the arrows needed
    \node [arrowstyle, minimum height=2.1cm] [right =0.2cm of NILa] {};
    %Take the coordinate of the corner between the second and third boxes 
    \path  (NILb.south) |- coordinate (aux2) (NILc.east);
    \node [arrowstyle] [below=0.2cm of NILb] {};
} %This bracket closes the \tikz command
\end{document}
  • Nodes aren't really that flexible, is the fading in the arrow a requirement? – Torbjørn T. Aug 29 '17 at 18:22
  • @TorbjørnT. Many thanks. Apart from the long time I spent on this issue, it is not a must:). The figure is more diagrammatic and no qualitative info is available so decoration is preferred. – Mazen Aug 29 '17 at 18:54
1

Nodes aren't that flexible, so it's likely easier to do this with a normal line path. Make a style

widearrow/.style={
    -{Triangle[length=6mm,width=10mm]},line width=4mm,gray
}

and do e.g.

\draw [widearrow] ([yshift=-1mm]NILb.south) to[out=270,in=20] (NILc.east);

You can do an arrow with a corner using

\draw [widearrow] ([yshift=-1mm]NILb.south) |- (NILc.east);

output of code

(The black squares are due to the demo option, you don't want to have that in your document.)

\documentclass[
  demo % remove this in your document
]{article}
\usepackage{listings}
\usepackage[svgnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{
  fadings,
  shapes.arrows,
  shadows,
  arrows.meta, % has replaced the old arrows library
  positioning,
  calc
}

\begin{document}
\begin{tikzpicture}[
   baseline = (NILa.north),
   widearrow/.style={
    -{Triangle[length=6mm,width=10mm]},line width=4mm,gray
   }
] 

    %Load the pics from file and align them
    \node[anchor=north west,inner sep=0] (NILa) at (0,0) {\includegraphics[width=0.3\textwidth]{NILa.png}};
    \node[inner sep=0] (NILb) [right =3cm of NILa] {\includegraphics[width=0.3\textwidth]{NILb.png}};
    \path (NILa.south west) -- coordinate (aux) (NILa.south -| NILb.east);
    \path   let 
                \p1=(aux)
            in
            node (NILc) [below] at ($(\x1, \y1-1.5cm)$) {\includegraphics[width=0.3\textwidth]{NILc.png}}
    ;
    %Now I insert the arrows needed
    %\node [arrowstyle, minimum height=2.1cm] [right =0.2cm of NILa] {};
    \draw [widearrow,shorten >=1mm,shorten <=1mm] (NILa) -- (NILb);
    \draw [widearrow] ([yshift=-1mm]NILb.south) to[out=270,in=0] (NILc.east);
\end{tikzpicture}

\begin{tikzpicture}[
   baseline = (NILa.north),
   widearrow/.style={
    -{Triangle[length=6mm,width=10mm]},line width=4mm,gray
   }
] 

    %Load the pics from file and align them
    \node[anchor=north west,inner sep=0] (NILa) at (0,0) {\includegraphics[width=0.3\textwidth]{NILa.png}};
    \node[inner sep=0] (NILb) [right =3cm of NILa] {\includegraphics[width=0.3\textwidth]{NILb.png}};
    \path (NILa.south west) -- coordinate (aux) (NILa.south -| NILb.east);
    \path   let 
                \p1=(aux)
            in
            node (NILc) [below] at ($(\x1, \y1-1.5cm)$) {\includegraphics[width=0.3\textwidth]{NILc.png}}
    ;
    %Now I insert the arrows needed
    %\node [arrowstyle, minimum height=2.1cm] [right =0.2cm of NILa] {};
    \draw [widearrow,shorten >=1mm,shorten <=1mm] (NILa) -- (NILb);
    \draw [widearrow] ([yshift=-1mm]NILb.south) |- (NILc.east);
\end{tikzpicture}
\end{document}
  • Many thanks for providing the solution. There are two issues to follow up: 1- The entering angle of the the second arrow, I tried to set it to 0 but the arrow head is still tilted. I tried with negative angle values and the situation is better with -17 degrees. Shifting the third figure left a bit helps reducing the entering angle. If there is something like chamfering as in AutoCAD, that would be easier to manipulate. 2-Fiddling around to try the shading property, I was not lucky to get it running. Is there a way to get it with the 'line' command rather than the 'node' command? – Mazen Aug 30 '17 at 9:04
  • @Mazen Seems the bending library wasn't a good idea, try removing that. Regarding the shading, perhaps tex.stackexchange.com/questions/137357/… or tex.stackexchange.com/questions/134283/… can help, I haven't tried myself yet. – Torbjørn T. Aug 30 '17 at 9:14
  • @Mazen Another ugly hack: \node [arrowstyle, minimum height=1cm,rotate=180,transform shape,right=0cm of NILc,anchor=east] (a2) {}; \path let \p1=(NILb.south),\p2=(a2.south east),\n1={\y1-\y2-1mm} in node [arrowfill,top color=LightGray,bottom color=Gray,minimum height=3mm,minimum width=\n1,rotate=-90,transform shape,anchor=south east] at (a2.south west) {}; – Torbjørn T. Aug 30 '17 at 9:35
  • Many thanks for your support and apologies for not responding shortly. I will go for the next one and will try to play aroud with the shadowing. If I were lucky to get it working I'll re-answer my question for other to benefit from the code. – Mazen Aug 31 '17 at 14:50

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.