答案1
\documentclass[tikz, border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\begin{scope}[shift={(-2,0,0)}]
\draw[->] (0,0,0)--(1,0,0) node[right]{$x$};
\draw[->] (0,0,0)--(0,1,0) node[above]{$z$};
\draw[->] (0,0,0)--(0,0,1) node[below left]{$y$};
\end{scope}
\foreach \i in {1,...,5}{
\draw[fill=yellow!80!black] (0,\i,0) -- (4,\i,0)--(4,\i,2)--(0,\i,2)--cycle;
\node[right] at (4,\i,0) {$Z_\i$};
}
\end{tikzpicture}
\end{document}
更新:
\documentclass[tikz, border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}[scale=2]
\begin{scope}[shift={(-2,0,0)}]
\draw[->] (0,0,0)--(1,0,0) node[right]{$x$};
\draw[->] (0,0,0)--(0,1,0) node[above]{$z$};
\draw[->] (0,0,0)--(0,0,1) node[below left]{$y$};
\end{scope}
\foreach \i in {1,...,5}{
\draw[fill=yellow!80!black] (0,\i,0) -- (4,\i,0)--(4,\i,2)--(0,\i,2)--cycle;
\node[right] at (4,\i,0) {$Z_\i$};
}
\draw[<->] (0,3,2) -- (0,4,2) node[midway,left]{$d$};
\end{tikzpicture}
\end{document}