\documentclass{standalone}
\usepackage{comment}
\usepackage{tikz,pgf}
\usetikzlibrary{fit,scopes,calc,matrix,positioning,decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}
\begin{scope}
\matrix (A5) [matrix of nodes, ampersand replacement = \&] {
{7} \& {2} \& {7} \& {7} \& {2} \& {8}\\
};
\end{scope}
\begin{scope}
\matrix (B5) at ([yshift=-2.5cm]A5-1-1.south) [anchor=B5-1-1.north, matrix of nodes, ampersand replacement = \&] {
{12} \& {7} \& {2} \& {7} \& {2} \& {8}\\
};
\end{scope}
\path[draw] (A5-1-3.north west) -- (A5-1-4.north east) -- (B5-1-4.south east) -- (B5-1-4.south west) -- (A5-1-3.north west);
\end{tikzpicture}
\end{document}
Here \path[draw] groups 7s of the two matrices together. Is there any way to group them with a more "curvy" curve? i.e. by some curve that doesn't look so regular.




cycleyou can just repeat the first point to close the shape. – percusse Jan 10 '12 at 02:15