Math & Science ⇒ Creating a number line
Creating a number line
Thanks
Olga
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Creating a number line
Code: Select all
\psset{yunit=0.5cm,xunit=3cm}
\begin{pspicture}(-2,-1)(2,1)
\psline[linewidth=2pt,linecolor=red](-2,0)(2,0)
\multido{\n=-2.00+0.25}{17}{
\psline[linewidth=1pt,linecolor=red](\n,0.5)(\n,-0.5)
\rput{90}(\n,-1.5){\scriptsize \n}}
\end{pspicture}
Code: Select all
\usepackage{pstricks}
\usepackage{multido}
You can read about PSTricks at CTAN: http://tug.ctan.org/tex-archive/graphic ... t-user.pdf
And you can also read about the multido package at CTAN: http://mirrors.dotsrc.org/ctan/macros/g ... ultido.pdf