Starting, for example as MWE from the answer's Torbjørn T. at this question plotting a grid like this with TikZ,

% draw axis lines
\draw [->] (-0.5,0) -- (5,0) node[below]{$n$};
\draw [->] (0,-0.5) -- (0,3) node[left]{$k$};

% place bullets
\foreach \x in {0,1,2,3}
  \foreach \y in {0,0.2,...,2}
     \fill (\x,\y) circle[radius=2pt];

% place ticklabels below x-axis
\foreach \x/\txt in {1/L,2/2L,3/3L}
   \node [below] at (\x,0) {$\txt$};

% place ticklabel for y-axis
\node [left] at (0,2) {$N-1$};

% place 2pi/n-node left of axis
\node [left=1.4cm,inner xsep=0pt] (A) at (0,1) {$\frac{2\pi}{n}$};

% dots on the far right
\node at (4,1) {$\dots$};

% draw lines from fourth and fifth bullet to a coordinate relative to the 2pi/n node
% (vertical separation of bullets is 0.2)
\draw (0, 4*0.2) to[out=180,in=0] ([yshift=-0.5cm,xshift=2pt]A.south west);
\draw (0, 5*0.2) to[out=180,in=0] ([yshift=0.5cm,xshift=2pt]A.north west);

% draw arrows
\draw [->] (A.north) -- ++(0,0.5cm);
\draw [->] (A.south) -- ++(0,-0.5cm);

I would like to understand how to draw vertical rods (graduated rulers) of this 1 st picture

enter image description here

where the clocks that beat a generic time (rectangle with strange numbers) shall be replaced by simply circular clocks of the type shown in the 2 nd picture

enter image description here

With this modality I can change the background color of the clock and of the lancets.

  • @Bernard Thank you very much for edit my scarce English language. – Sebastiano Mar 31 '19 at 20:31
  • 1
    Typos happen so easily! So when I'm strolling around, I can't resist correcting it, if only to make it more pleasant to read for potential helpers. – Bernard Mar 31 '19 at 20:38

Something like this? This is 3d.

\tikzset{Sebastiano/.is family,
minute arm/.style={shorten >=0.5mm},
hour arm/.style={thick,shorten >=1.5mm},
random clock/.style={semithick,fill=white},
clock radius/.initial=5mm}
\begin{tikzpicture}[tdplot_main_coords,pics/random clock/.style={code={
\draw[Sebastiano/random clock] (0,0) 
circle[radius=\pgfkeysvalueof{/tikz/Sebastiano/clock radius}];
\draw[Sebastiano/hour arm] (0,0) -- (\hour:\pgfkeysvalueof{/tikz/Sebastiano/clock radius});
\draw[Sebastiano/minute arm] (0,0) -- (\minute:\pgfkeysvalueof{/tikz/Sebastiano/clock radius});
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{random clock={minute arm/.append style={red},
  hour arm/.append style={blue}}}}};

enter image description here

If you do not want 3d, just set \tdplotsetmaincoords{90}{00} to obtain

enter image description here

I hope the syntac

 pic{random clock={minute arm/.append style={red},
  hour arm/.append style={blue}}

is self-explanatory. If you want someone who draws "mathematicians axes" then I am not your guy. I explained here, why. I will be happy to add axes in orthographic projections, but this stuff discussed here has IMHO no place in a modern textbook. On the blackboard this is still fine.

| improve this answer | |
  • The clocks are very nice (perfect)...but thay must to stay in the vertical bars as the 1st picture in a 3d plane. – Sebastiano Mar 31 '19 at 22:06
  • 1
    @Sebastiano You only need to adjust the view angle. I added an example. – user121799 Mar 31 '19 at 22:14
  • 2
    @Sebastiano Can you please provide a sketch of what you want? 1) Of course you can color the hands. They are in the in the commands \draw[semithick] (0,0) circle[radius=0.5cm]; \draw[thick] (0,0) -- (\hour:0.35);, just try out \draw[semithick,blue] (0,0) circle[radius=0.5cm]; \draw[thick,red] (0,0) -- (\hour:0.35); 2) How many? 3) Do you want an orthographic projection or not? See tex.stackexchange.com/a/448048/121799 for why I am asking. P.S. Will go to basketball very soon. – user121799 Mar 31 '19 at 22:24
  • 2
    @Sebastiano Frankly, the sketch is not 100% clear because you said that you do not want to reproduce the sketch. Is it better now? – user121799 Apr 1 '19 at 1:40
  • 1
    @Sebastiano Yes. If you add \pgfmathsetseed{...} where ... is an integer of your choice, at the beginning of the tikzpicture, the result should be the same for every compilation. – user121799 Apr 4 '19 at 16: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.