# Drawing parallel planes with groups of the elements of it

Just want to draw two parallel planes with the grouped elements on it. Can you please help a little bit with the groups on planes?

\begin{tikzpicture}[scale=2,every node/.style={minimum size=1cm},on grid]

\begin{scope}[
yshift=-100,xshift=-100,every node/.append style={
yslant=0.5,xslant=-1.0},yslant=0.5,xslant=-1.0
]
\fill[white,fill opacity=0.9] (0,0) rectangle (2,2);
\draw[step=2mm, thin, gray] (0,0) grid (2,2); %defining grids
\draw[black,very thick] (0,0) rectangle (2,2);%marking borders
\end{scope}

\begin{scope}[
yshift=-160,every node/.append style={
yslant=0.5,xslant=-1.3},yslant=0.5,xslant=-1.3
]
%marking border
\draw[black,very thick] (0,0) rectangle (2,2);

\end{scope} %end of drawing grids

\end{tikzpicture}


Want to have smth like this:

Thanks a lot!

• Welcome! Can you edit your question to make your code compilable, please? It is much easier when people don't have to guess what packages and class they need to make it work. – cfr Mar 9 '17 at 22:57
• How is on grid defined? – cfr Mar 9 '17 at 23:00
• @cfr on grid comes with positioning TikZ library. – Paul Gaborit Mar 9 '17 at 23:06
• @PaulGaborit Thanks. (Too late for this one ;).) – cfr Mar 9 '17 at 23:19

Something like this?

After completing your MWE partially (incomplete guesswork - didn't all work), I deleted undefined stuff and stuff doing no work.

\documentclass[border=10pt,multi,tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\begin{scope}[
xshift=-200,
yslant=0.5,
xslant=-1
]
\draw [step=5mm, thin, gray] (0,0) grid (5,5); %defining grids
\draw [black, thick] (0,0) rectangle (5,5);%marking borders
\draw [red, ultra thick] (0,0) |- (3,3) |- (1.5,1.5) |- cycle;
\draw [yellow, ultra thick] (2,0) |- (1,1.5) |- (4,4) |- cycle;
\filldraw (4.75,0.25) coordinate (a) circle (1.5pt);
\end{scope}
\begin{scope}[
yshift=-120,
yslant=0.5,
xslant=-1.3
]
%marking border
\draw[black,thick] (0,0) rectangle (5,5);
\draw [red, ultra thick] (0,0) |- (3,3) |- (1.5,1.5) |- cycle;
\draw [yellow, ultra thick] (2,0) |- (1,1.5) |- (4,4) |- cycle;
\filldraw (4.75,0.25) coordinate (b) circle (1.5pt);
\end{scope} %end of drawing grids
\draw [->, ultra thick, shorten >=2.5pt, shorten <=2.5pt] (a) -- (b);
\end{tikzpicture}
\end{document}