# Draw a specific number line

dI would like to draw the following number line where N is just a fixed number

and B1 is the set {1,...,N} etc.

Although i searched and found somes codes displaying similar lines using tikz

i couldnt adjust the proper modifications. Any help would be appreciated , thanks in advance!

This could be a starting point:

\documentclass[border=3mm]{standalone}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[xscale=1.2,font=\footnotesize]
\draw (0,0) -- (12,0);
%
\foreach\m/\n in {0/1,3/N,4/N+1,7/2N,8/2N+1,11/3N}
{\node[scale=.7] at (\m,0) {$|$};
\node[below,yshift=-5pt] at (\m,0) {$\n$};}
%
\path
node[above] at (1.5,0) {$B_1$}
node[above] at (5.5,0) {$B_2$}
node[above] at (9.5,0) {$B_3$};
\end{tikzpicture}

\end{document}


• 3/N, I think, 6/2N? – minhthien_2016 May 22 at 9:34