# Draw a table of clocks on a plane

Inspired by this question and an answer by @Schrödinger's cat, how to draw a table of clocks on a plane in an effective way?

• I'm voting to close this question as this is too broad and -1 for making it ajust-do-it-for-me question. And, if you find the answers to your past questions useful, consider accepting then before asking a new one. – Raaja Sep 22 at 10:25
• Your question leaves all the effort to our community, even typing the essentials of a TeX document such as \documentclass{}...\begin{document} etc. As it is, most of our users will be very reluctant to touch your question, and you are left to the mercy of our procrastination team who are very few in number and very picky about selecting questions. You can improve your question by adding a minimal working example (MWE) that more users can copy/paste onto their systems to work on. If no hero takes the challenge we might have to close your question. – BambOo Sep 22 at 10:54
• While you're working on an MWE, maybe this answer can get you started with the plane. You'll just have to add the clocks. – schtandard Sep 22 at 14:01

This is just a nested loop.

\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}
\foreach \X in {1,...,5}
{\foreach \Y in {1,2,3}
(\X,\Y) -- ++(180-45*\X:0.4);
}}
\end{tikzpicture}
\end{document}


But one can do better using some existing post.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{3d,decorations.markings}
\tikzset{Annie/.cd,
hour/.initial=0,
hour arm/.style={thick,shorten >=1mm,red},
clock/.style={semithick,fill=white},
\begin{document}
\tdplotsetmaincoords{60}{20}
\begin{tikzpicture}[tdplot_main_coords,pics/clock/.style={code={
\tikzset{Annie/.cd,#1}
\draw[Annie/clock] (0,0)
\draw[Annie/hour arm] (0,0) --
}},ruler/.style={postaction={decorate,decoration={markings,
mark=between positions 0 and 1 step 5pt with {\draw (0,-#1/2) -- (0,#1/2);}}}}]
\begin{scope}[canvas is xz plane at y=0,transform shape]
\draw[double=cyan,double distance=4pt,ruler=4pt] (-4,-2.4) grid[step=pi/2] (4,4);
\path foreach \X in {-2,...,2}
{foreach \Y in {-1,...,2}
{ (\X*pi/2,\Y*pi/2) pic{clock={hour=\X*3/2}}}};
\end{scope}
\end{tikzpicture}
\end{document}


\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{3d,decorations.markings}
\tikzset{Annie/.cd,
hour/.initial=0,
hour arm/.style={thick,shorten >=1mm,red},
clock/.style={semithick,fill=white},
\begin{document}
\tdplotsetmaincoords{60}{00}
\begin{tikzpicture}[tdplot_main_coords,pics/clock/.style={code={
\tikzset{Annie/.cd,#1}
\draw[Annie/clock] (0,0)
\draw[Annie/hour arm] (0,0) --
}},ruler/.style={postaction={decorate,decoration={markings,
mark=between positions 0 and 1 step 5pt with {\draw (0,-#1/2) -- (0,#1/2);}}}}]
\begin{scope}[canvas is xz plane at y=0,transform shape]
\draw[double=cyan,double distance=4pt,ruler=4pt] (-4,-2.4) grid[step=pi/2] (6,4);
\path foreach \X in {-2,...,3}
{foreach \Y in {-1,...,2}
{ (\X*pi/2,\Y*pi/2) pic{clock={hour=\X*3/2}}}};
\end{scope}
\end{tikzpicture}
\end{document}


• Nice for the last figure. how do we remove the blue rulers or rails? – annie heart Sep 22 at 2:31
• @annieheart I changed it. (Had to change a couple of pgf keys.) If you want an "untitled" view, use e.g. \tdplotsetmaincoords{60}{0}. – Schrödinger's cat Sep 22 at 2:41