2

I need this figure drawn in TikZ for work. How do I do it?

I need this

So far, I have:

\documentclass[tikz,border=2mm]{standalone}
\usepackage{lmodern}
\begin{document}
\begin{tikzpicture}[y=2cm, font=\sffamily\small]

\draw[->] (0,0) -- (4.5,0) node[below] {$$};


\foreach \i in {1,2,3,4} \draw (\i,1mm) -- (\i,-1mm) node[below] {\i}; 

\end{tikzpicture}
\end{document}
  • 2
    Is the unequal spacing and the displacement of the arrows intended? – Henri Menke Dec 26 '15 at 16:33
  • I did it with paint. The distance of the nodes (1,2,3 ..) is the same. Sorry – Solid Dec 26 '15 at 16:38
  • 2
    Welcome to Tex SE. Have you searched the site for similar drawings to replicate? – Alenanno Dec 26 '15 at 16:39
  • I don't know the type of latex is this. – Solid Dec 26 '15 at 16:41
  • 1
    could you post a MWE of the code you already wrote trying to achieve this? – Rico Dec 26 '15 at 16:41
7

Here, without the unequal spacing and displaced arrows, but with TikZ.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows}
\begin{document}
\begin{tikzpicture}[scale=0.5,
  down arrow/.style = {
    single arrow, draw,
    minimum height=2.5em,
    transform shape,
    rotate=-90,
  }]
  \draw (0,0) -- (10,0);
  \foreach \i in {1,...,9}
    \draw (\i,0.3) -- (\i,-0.3) node[below] {\i};
  \foreach \i in {1,2,4,6,7,9}
    \node[down arrow] at (\i,1) {};
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.