我的双曲线只有一半的上半部分显示正确。另一半显示了一些奇怪的内容:
\documentclass{article}
\usepackage{tikz, pgf}
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\clip (0,-3) rectangle (4,3);
\draw [samples = 50, domain = -0.99:0.99,
rotate around = {0:(0,0)}, xshift = 0cm, yshift = 0cm]
plot ({0.69*(1+\x^2)/(1-\x^2)}, {0.72*2*\x/(1-\x^2)});
\end{scope}
\end{tikzpicture}
\end{center}
\end{document}
答案1
替换\x*\x
或(\x)^2
解决\x^2
您的问题。
\documentclass{article}
\usepackage{tikz, pgf}
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{scope}
\clip (0,-3) rectangle (4,3);
\draw [samples = 50, domain = -0.99:0.99,
rotate around = {0:(0,0)}, xshift = 0cm, yshift = 0cm]
plot ({0.69*(1+\x*\x)/(1-\x*\x)}, {0.72*2*\x/(1-\x*\x)});
\end{scope}
\end{tikzpicture}
\end{center}
\end{document}
答案2
使用 PSTricks。
\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-plot,pst-math}
\def\X(#1){COSH(#1)}
\def\Y(#1){SINH(#1)}
\psset{algebraic}
\begin{document}
\begin{pspicture}(-6,-4)(6,4)
\psaxes{->}(0,0)(-6,-4)(5.5,3.5)[$x$,0][$y$,90]
\psset{linecolor=blue}
\psparametricplot{-2}{2}{\X(t)|\Y(t)}
\psparametricplot{-2}{2}{-\X(t)|\Y(t)}
\end{pspicture}
\end{document}