Sabtu, 08 Juni 2024

Number Line In Latex

type this following latex code for drawing a number line:
\documentclass[tikz,margin=0.25cm]{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usetikzlibrary{arrows}

% Number Line In Latex
\begin{document}
\begin{tikzpicture}

% edit here for the x-axis horizontal line
\draw[latex-latex, ultra thick](-6.5,0) -- (6.5,0);

% edit here for x-axes tick/node/point/dot lines
\foreach \x in {-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6}
\draw[shift={(\x,0)},color=black] (0pt, 3pt) -- (0pt, -3pt);

% edit here for the axes numbers below the x-axes horizontal line
\foreach \x in {-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6}
\draw[shift={(\x,0)},color=black](0pt, 0pt) -- (0pt, -3pt) node[below] {$\textbf{\x}$};
\end{tikzpicture}
\end{document}

Output:

number line



Notes To see the more clear picture, click on the picture.


to learn other Latex draw topics, click Study About Draw In Latex >>

tex math and science document sample, latex math and science document example, learn about latex, latex lesson, mathematics, latex equation, latex draw, drawing in latex, latex graphic

Tidak ada komentar:

Posting Komentar