2

Would like to draw an arrow between node (a) and node (b) similar to hand drawn in the attached image named document3. Following is the code

\documentclass[tikz,border=0pt]{standalone}
\usepackage{tikz}  
\usepackage{graphicx}
\usepackage{amsmath}
\usetikzlibrary{fit,matrix,shapes,arrows,backgrounds,positioning,calc}

\begin{document}
\begin{tikzpicture}[
    background rectangle/.style={% Background style
        rectangle, 
        rounded corners,          
        },
    show background rectangle,        
    >=latex,
    line width=1pt
]

\node[inner sep=0pt] (FIG1) at (0,-1){\includegraphics[scale=1]{document_1.pdf}};
\draw (FIG1)++(0,-3.6) node[scale=1]{(a)};
\node[inner sep=0pt] (FIG2) at (6,-1.9){\includegraphics[scale=1]{document_2.pdf}};
\draw (FIG2)++(1.8,-2.2) node[scale=1]{(b)};
 \draw (FIG2)++(1.2,3.2) node[scale=1]{Failure Correlation Identification};   
\node[ draw, red, dashed, line width=0.7pt, fit=(FIG1)(FIG2)](node1){};     
 \node[inner sep=0pt] (FIG4) at (-2,-8.2) {\includegraphics[scale=1]{Distance_Matrix_3.pdf}};
 \draw (FIG4)++(.3,-2.05) node[scale=1]{(c)};
 \node[inner sep=0pt] (FIG5) at (2.7,-8.4) {\includegraphics[scale=.2]{S1_C1.pdf}};     
 \draw (FIG5)++(.2,-1.85) node[scale=1]{(d)};    
 \node[ draw, green, dashed, line width=0.7pt, fit=(FIG4)(FIG5), minimum width=2cm, minimum height = 4.6cm](node2){};     
 \draw (FIG4)++(2.5,1.9) node[scale=1]{Hierarchical Clustering};   
 \node[inner sep=0pt] (FIG6) at (8,-8.3) {\includegraphics[scale=.27]{Kmeans.pdf}};  
 \node[ draw, blue, dashed, line width=0.7pt, fit=(FIG6), minimum width=4cm, minimum height = 4.6cm] at (8,-8.2)(node3){};
 \draw (FIG6)++(.1,-1.95) node[scale=1]{(e)};
 \draw (FIG4)++(10,1.9) node[scale=1]{Non-Hierarchical Clustering};   
\draw [-latex, thick] (FIG4) -- (FIG4 -| FIG5.west);
\draw[->] (node1.south) |- ($(node1.south) - (0,5mm)$) -| (node2.north);
\draw[->] (node1.south) |- ($(node1.south) - (0,5mm)$) -| (node3.north);   
\end{tikzpicture}
\end{document}

document3

4

I do not have the graphics files you are including but you may try

\documentclass[tikz,border=0pt]{standalone}
\usepackage{tikz}  
\usepackage{amsmath}
\usetikzlibrary{fit,backgrounds,positioning,calc}

\begin{document}
\begin{tikzpicture}[
    background rectangle/.style={% Background style
        rectangle, 
        rounded corners,          
        },
    show background rectangle,        
    >=latex,
    line width=1pt
]

\node[inner sep=0pt,yscale=2] (FIG1) at (0,-1){\includegraphics[scale=0.3]{example-image-a}};
\draw (FIG1)++(0,-3.6) node[scale=1]{(a)};
\node[inner sep=0pt,xscale=3] (FIG2) at (6,-1.9){\includegraphics[scale=0.2]{example-image-b}};
\draw (FIG2)++(1.8,-2.2) node[scale=1]{(b)};
\draw[thick,-latex] (FIG1.20) -| (FIG2)
node[midway,above]{Failure Correlation Identification} ;
\node[ draw, red, dashed, line width=0.7pt, fit=(FIG1)(FIG2)](node1){};     
 \node[inner sep=0pt] (FIG4) at (-2,-8.2) {\includegraphics[scale=0.3]{example-image-c}};
 \draw (FIG4)++(.3,-2.05) node[scale=1]{(c)};
 \node[inner sep=0pt] (FIG5) at (2.7,-8.4)
 {\includegraphics[scale=.2]{example-image-duck}};     
 \draw (FIG5)++(.2,-1.85) node[scale=1]{(d)};    
 \node[ draw, green, dashed, line width=0.7pt, fit=(FIG4)(FIG5), minimum width=2cm, minimum height = 4.6cm](node2){};     
 \draw (FIG4)++(2.5,1.9) node[scale=1]{Hierarchical Clustering};   
 \node[inner sep=0pt] (FIG6) at (8,-8.3) {\includegraphics[scale=.27]{example-image-duck}};  
 \node[ draw, blue, dashed, line width=0.7pt, fit=(FIG6), minimum width=4cm, minimum height = 4.6cm] at (8,-8.2)(node3){};
 \draw (FIG6)++(.1,-1.95) node[scale=1]{(e)};
 \draw (FIG4)++(10,1.9) node[scale=1]{Non-Hierarchical Clustering};   
\draw [-latex, thick] (FIG4) -- (FIG4 -| FIG5.west);
\draw[->] (node1.south) |- ($(node1.south) - (0,5mm)$) -| (node2.north);
\draw[->] (node1.south) |- ($(node1.south) - (0,5mm)$) -| (node3.north);   
\end{tikzpicture}
\end{document}

enter image description here

  • Thanks for your answer. However, I don't want an angle in the arrow. – Yogesh Sharma Jan 24 at 17:33
  • @YogeshSharma Do you just want to have two straight lines meeting at a 90 degree angle? – user121799 Jan 24 at 17:34
  • Yes and the line meeting with image (b) must have an arrow at the end. – Yogesh Sharma Jan 24 at 17:35
  • @YogeshSharma I updated. – user121799 Jan 24 at 17:37

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.