Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to have the command line arguments in PSTricks to sketch the curve $$x^{2}-y^{2}=n^{2}$$.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted
\documentclass[fleqn]{book}
\usepackage[top=3cm,left=3cm,right=3cm,bottom=2.5cm,a4paper]{geometry}
\usepackage{lmodern}
\usepackage{pst-plot}
\usepackage{pstricks-add}
\usepackage{multido}
\begin{document}
\begin{figure}[h]\centering
\psset{unit=0.75}
\def\xMax{12}
\def\yMax{6}
\def\Po{300}
\begin{pspicture}(0,-\yMax)(\xMax,\yMax)
\psclip{\psframe[fillstyle=solid,fillcolor=gray!10,linestyle=none](0,-\yMax)(\xMax,\yMax)}
\psline(-\xMax,0)(\xMax,0)
\psline(0,-\yMax)(0,\yMax)
\multido{\n=0+1,\i=9+9}{10}{
\psplot[linewidth=1.5pt,plotpoints=\Po,plotstyle=line,algebraic=true,linecolor=black!\i]{\n}{2\n}{sqrt(x^2-\n^2)}%
\psplot[linewidth=1.5pt,plotpoints=\Po,plotstyle=line,algebraic=true,linecolor=black!\i]{\n}{2\n}{-sqrt(x^2-\n^2)}}
\endpsclip
\end{pspicture}
\end{figure}
\end{document}
share|improve this answer
    
Thanks a ton! –  user641 Sep 6 '10 at 20:56
add comment

You may want to visit the page of all PSTricks extensions on CTAN: pstricks and then, click on "base" or "contrib".

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.