By that I mean a number line with specific interval values marked. For example an interval of [-1,3). If it's possible, I prefer that the markings be brackets and parentheses on the number line, but if I could create anything like what you see on this URL (http://www.nipissingu.ca/calculus/tutorials/sets.html) that would be excellent. So if there's any package or program that can generate these and works well, I'd like to know, and an example of code would really help, too.
Thanks
Graphics, Figures & Tables ⇒ How is a number line for an interval created?
NEW: TikZ book now 40% off at Amazon.com for a short time.

How is a number line for an interval created?
Hi,
you can use the PGF/TikZ package. Take a look at the following very simple example:
Of course, my example must be taken just as a starting point; you can improve it.
you can use the PGF/TikZ package. Take a look at the following very simple example:
Code: Select all
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\newcommand\Interval[4]{%
\begin{tikzpicture}[text height=1ex]%
\draw[<-] (0,0) -- (1,0);
\draw[{#3-#4}] (1,0) node[label=below:{#1}] {} -- (2,0) node[label=below:{#2}] {};
\draw[->] (2,0) -- (3,0);
\end{tikzpicture}
}
\begin{document}
\Interval{-3}{8}{(}{)}
\Interval{1}{4}{[}{)}
\Interval{-4}{-1}{(}{]}
\Interval{0}{4}{[}{]}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...