答案1
一个选项是使用TikZ
:
代码:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\usepackage{eurosym}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}[>=latex]
\draw
(0,0) -- ++(10cm,0pt);
\foreach \Valor in {1,...,9}
{
\draw (\Valor,-3pt) -- (\Valor,3pt);
}
\draw[->]
(5,-3pt) --
++(0pt,1.2cm)
node[above,text=green!80!black] {Mediane: $D5$};
\draw
(0,-3pt) --
++(0pt,15pt)
node[above] {$0$\,\euro};
\draw
(10,-3pt) --
++(0pt,15pt)
node[above] {$\max$\,\euro};
\foreach \Valor in {0,1,9}
{
\draw[decorate,orange,decoration={brace,mirror,raise=10pt}]
(\Valor,-10pt) --
++(1cm,0pt)
node[text=purple,midway,below=12pt] {\SI{10}{\percent}};
}
\draw[decorate,orange,decoration={brace,mirror,raise=30pt}]
(5,-10pt) --
++(5cm,0pt)
node[text=green!80!black,midway,below=32pt] {\SI{50}{\percent}};
\foreach \Valor/\Texto in {1/1er,9/9e}
{
\draw[->]
(\Valor,20pt) --
++(0pt,25pt)
node[text=blue,above] {\Texto\ décile: $D\Valor$};
}
\end{tikzpicture}
\end{document}