1

I would like to get the following image.

enter image description here

Is it possible to draw using tikz or pstricks in latex? Please note the text labelling as well.

I got a link in a similar spirit, but could not utilize it to get what I exactly want. :(

Any help?

hbaromega
  • 323
  • Have you looked at the xyz coordinate system of TikZ? A basic knowledge in R3 geometry would help. – azetina Apr 09 '15 at 15:03
  • I think you could modify this diagram to get the desired result http://www.texample.net/tikz/examples/swan-wave-model/ – R. Schumacher Apr 09 '15 at 15:06

1 Answers1

6
\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}

enter image description here

Update:

\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}

enter image description here

Ignasi
  • 136,588
  • thanks a lot. What if I want to draw a double-headed arrow between the plates marked by Z_3 and Z_4 and write d beside it to denote the distance between two plates? Also how can I increase the size of the whole image in my tex? – hbaromega May 01 '15 at 10:38
  • 1
    @hbaromega I've updated the answer. I don't want to be rude, but this kind of question denotes too little effort from you. If you try to understand the code I gave you, reading some of first tutorials in pgfmanual or diving a little bit through TeX.SX, you won't have to ask such simple things. – Ignasi May 01 '15 at 13:00