# Drawing the 2.4Ghz ISM band using Tikz

I am trying to make the figure below in Tikz. However, since I am relatively new to Tikz I cannot make an image myself without example code. I haven't seen another person asking for something similiar, so I am a little bit clueless at the moment.

Is there anyone that can help me drawing this 2.4 Ghz ISM band using Tikz?

• Welcome to TeX.SX. Visit texample.net/tikz/examples for examples. – nidhin Dec 13 '18 at 8:04
• @nidhin Thank you for your response. I checked the categories computer science, physics and mathematics, but there was no example that is similiar to the 2.4 Ghz ISM band. – Xhendos Dec 13 '18 at 8:07
• What have you tried? – Henri Menke Dec 13 '18 at 8:07
• @HenriMenke I have read the Tikz and PGF manual trying to find something similiar that I can work on. There is a one-liner to plot a function, but I am not too experienced to work with it. – Xhendos Dec 13 '18 at 8:15
• @Xhendos The first 150 pages or so of the TikZ manual are tutorials. Have you worked through them? Afterwards it should be a piece of cake to draw what you want. – Henri Menke Dec 13 '18 at 8:21

## 2 Answers

To give you a start (and to show it is really simple, even marmots can do that ;-).

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[rotate=90,transform shape]
\xdef\lstN{37}
\foreach \X in {0,...,36}
{\xdef\lstN{\lstN,\X}
\ifnum\X=10
\xdef\lstN{\lstN,38}
\fi}
\xdef\lstN{\lstN,39}
\foreach \X [count=\Y,evaluate=\Y as \Z using {int(2400+2*\Y)}] in \lstN
{\draw[overlay] (0,-\Y/2) to[out=0,in=0,looseness=12] coordinate[midway](aux)
(0,{-(\Y+1)/2}) coordinate (aux1);
\foreach \XX in {37,38,39}
{\ifnum\X=\XX
\fill[blue!20] (0,-\Y/2) to[out=0,in=0,looseness=12] (0,{-(\Y+1)/2});
\fi}
\node at (0.5,{-(2*\Y+1)/4}){\X};
\node[anchor=east,font=\sffamily] at (-0.1,{-(2*\Y+1)/4}){\Z\,MHz};
\path(aux);
}
\draw (0,-1/2) -- (aux1);
\end{tikzpicture}
\end{document}


The result is not so nice like marmot's, but I think with easier code.

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{shapes.geometric}
\usepackage{siunitx}

\begin{document}
\begin{tikzpicture}

\begin{scope}
\clip (-1mm,0) rectangle (20cm,3);
\foreach \i in {1,...,40}
\node[ellipse, shape border rotate=90, minimum width=5mm,
minimum height=5cm, draw, anchor=east] at (\i*5mm,0) (\i) {};
\end{scope}

\draw (1.west)--(40.east);

\foreach \i [count=\ni, evaluate=\i as \fq using int(2040+2*\i)] in {37,0,1,...,10,38,11,12,...,36,39}{
\node at ([yshift=7mm]\ni.center) {\i};
\node[rotate=90, anchor=east] at ([yshift=-2mm]\ni.center) {\fq\ MHz};
}
\end{tikzpicture}
\end{document}