具有不同间隔的数轴

具有不同间隔的数轴

我是乳胶的新手,我想知道如何创建具有不同间隔和标记字母的数字线,如下所示:在此处输入图片描述

答案1

尝试从如下的事情开始:

\documentclass{article}
\usepackage{tikz}
\usepackage{mathtools}

\begin{document}

    
\begin{tikzpicture}
    
\draw(0,0) -- (10,0);

\node at (1,-1) {0};
\draw(1,0.2) -- (1,-0.2);

\node at (2,-1) {$\dfrac{1}{q}$};
\draw(2,0.2) -- (2,-0.2);

\node at (3,-1) {$\dfrac{2}{q}$};
\draw(3,0.2) -- (3,-0.2);

\node at (4.5,-1) {$\dfrac{P}{q}$};
\draw(4.5,0.2) -- (4.5,-0.2);

\node at (5,1) {P};
\draw(5,0.2) -- (5,-0.2);

\node at (6,-1) {$\dfrac{P+1}{q}$};
\draw(6,0.2) -- (6,-0.2);

\node at (10.5,0) {L};

\end{tikzpicture}

.
\end{document}

在此处输入图片描述

相关内容