[Tex/LaTex] How to draw some lines between figures in LaTex

graphicspgfplotstablestabularxtikz-pgf

I want to draw the following figure. How do I do this? Some lines between figures, and Can you give me this lines some color?
enter image description here

Some color lines in figure, as following:
enter image description here

Best Answer

May be some thing like this:

\documentclass{article}
\usepackage{colortbl}
\usepackage{arydshln,graphicx,xcolor,array}

\begin{document}
  \arrayrulecolor{magenta}%
  \setlength{\arrayrulewidth}{1pt}%
  \begin{tabular}{c;{2pt/2pt}c|}
    \includegraphics[width=3cm]{example-image-a} & \includegraphics[width=3cm]{example-image-b}
  \end{tabular}
  \arrayrulecolor{blue}%
  \setlength{\arrayrulewidth}{1pt}%
  \begin{tabular}{c;{2pt/2pt}c}
    \includegraphics[width=3cm]{example-image-a} & \includegraphics[width=3cm]{example-image-b}
  \end{tabular}

\end{document}

enter image description here

If you don't mind using tikz, you may use matrix library of tikz and draw the lines in any way you like. This method is highly versatile.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}

\begin{document}

\begin{tikzpicture}
\matrix (a)[row sep=0mm, column sep=0mm, inner sep=1mm,  matrix of nodes] at (0,0) {
            \includegraphics[width=3cm]{example-image-a} &
            \includegraphics[width=3cm]{example-image-b} &
            \includegraphics[width=3cm]{example-image-c}\\
            \includegraphics[width=3cm]{example-image-a} &
            \includegraphics[width=3cm]{example-image-b} &
            \includegraphics[width=3cm]{example-image-c}\\\\
        };
%

\draw[thick,red] (a-1-1.north east) -- (a-2-1.south east);
\draw[thick,densely dashed,blue] (a-1-2.north east) -- (a-2-2.south east);
\end{tikzpicture}

\end{document}

enter image description here