I'm fairly new to TikZ, and I'm kinda stuck with the basics... I'm trying to render this image: a busy cat

Is there an easy way to plot these bullet points? Plus is it possible to add the two curves around the arrows? Thanks in advance..

  • The "bullet points" are filled circles, but it you are going to do that many of them you might want to create a pic. Since your curves start and end at a known angle, you might try "curve to" (p 745). – John Kormylo Apr 22 '16 at 11:55

There are (as usual) several ways of achieving this, below I show one using two loops. A bit of fiddling to make the lines and arrows on the left.

enter image description here

% 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);
  • How about doing \foreach \lett [count=\x starting from 0] in {A,B,C,D}{ \foreach \y [count=\yy] in {0,0.2,...,2}{\node[circle, fill, inner sep=1.5pt] (\lett\yy) at (\x,\y) {};}} so you can refer to the circles using A4 for example? – Alenanno Apr 22 '16 at 12:46
  • I'm going to cry.. You are an artist sir! – Cobe Apr 22 '16 at 12:48
  • @Alenanno Sure, you could do that, but I didn't consider it necessary in this case. It's just those two lines on the left, and when you know the separation between the dots, it's trivial to get the y-coordinate. – Torbjørn T. Apr 22 '16 at 12:51

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.