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?

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

  • 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 1 '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 1 '15 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.