Help me to write the code of given figure in Latex.
Asked
Active
Viewed 100 times
1
-
Check out https://texample.net/tikz/examples/ – it has many examples that you could use an an inspiration to make the figure you need. – 01es Jun 21 '21 at 07:41
-
Can you show us the code you already tried yourself? I'm sure we can then help you with the rest. – samcarter_is_at_topanswers.xyz Jun 21 '21 at 08:03
2 Answers
1
To give you something to start with:
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\fill[blue,draw=black] (0,0) arc [start angle=180, end angle=0, radius=6];
\fill[violet,draw=black] (0,0) arc [start angle=180, end angle=0, radius=5];
\fill[red,draw=black] (0,0) arc [start angle=180, end angle=0, radius=4];
\fill[orange,draw=black] (0,0) arc [start angle=180, end angle=0, radius=3];
\fill[yellow,draw=black] (0,0) arc [start angle=180, end angle=0, radius=2];
\foreach \x in {0,...,6}{
\node at (2*\x,-0.3) {\x};
}
\end{tikzpicture}
\end{document}

samcarter_is_at_topanswers.xyz
- 33,336
- 5
- 41
- 62
1
My version with some cycles:
\documentclass[border=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\foreach \n in {0,...,6} \node [below] at (\n,0) {$\n$};
\foreach \m/\c in {6/0,5/25,4/50,3/75,2/100}%
\filldraw [black,fill=lime!\c!blue] (\m,0) arc(0:180:.5*\m) -- cycle;
\foreach \n in {1,...,5} \node [above] at (\n+.5,.1) {$\mathcal{U}_{\n}$};
\draw (0,0) -- (7,0);
\draw (1,.08) -- (1,-.08);
\end{tikzpicture}
\end{document}

MattAllegro
- 6,455
- 5
- 45
- 52