1

As an assignment I'm to explain the extensional quantity: {x | x ∈ N og x < 10} and I wish to show that it can be combined to write the function f(x) < 10: and plotting that on a number line graph. I'm new to using LaTeX and I'm struggling. I don't know where to begin other than I've been trying to use the pgfplots package.

The image is what I want it to look like.

Torbjørn T.
  • 206,688
  • 2
    Welcome to TeX.SE. Note that this site does not support LaTeX code itself, so if you want to show some mathematics then you need to type the actual symbols in unicode. Furthermore it would be helpful if you can show your (failed) attempt at making this graph in the form of a small but compilable document, so we known what your setup is, how far you have gotten, and which improvements are needed. You can modify your question by using the Edit link below the question. – Marijn Apr 23 '21 at 14:40
  • Some inspiration: https://tex.stackexchange.com/questions/333247/ https://tex.stackexchange.com/questions/254759/ (perhaps overly complicated) https://tex.stackexchange.com/questions/148252/ https://tex.stackexchange.com/questions/283868/ https://tex.stackexchange.com/questions/144532/ https://tex.stackexchange.com/questions/263122/ – Torbjørn T. Apr 23 '21 at 16:51
  • Hjertelig takk Torbjørn! Dette var til mye hjelp:) – Iver Finne Apr 28 '21 at 10:58

1 Answers1

3

This is my approach using tikz.

axis

\documentclass[border=5pt]{standalone}

\usepackage{tikz}

\begin{document} \begin{tikzpicture}

    \draw[stealth-] (-10.5,0) -- (10,0);
    \foreach \x in {-10,...,10}{
        \draw (\x,-2pt) node[below] (p-\x) {} -- (\x,2pt);
    }
    \foreach \x in {-10,-5,0,5,10}{
        \draw (\x,-4pt) node[below] {\x} -- (\x,4pt);
    }
    \draw[cyan,-stealth,line width=2pt] (-2,0) -- (10.5,0);
    \draw[cyan,line width=2pt, fill=white] (-2,0) circle[radius=2pt]; 
\end{tikzpicture}

\end{document}

Excelsior
  • 2,322
  • 1
    Tiny nitpick: You're not actually using the features of the arrows.meta library, as the stealth arrow tip is one of the standard ones. arrows.meta defines a tip Stealth (capital S). – Torbjørn T. Apr 23 '21 at 17:18
  • 1
    @TorbjørnT. You are right. I was first thinking of defining the circle of the start of the arrow using this library, but then I simply forgot to delete it. I will do this now. – Excelsior Apr 23 '21 at 18:09
  • Thanks Excelsior, just what I was looking for:) – Iver Finne Apr 28 '21 at 10:59