请给完整、可复制的代码。
代码不是看出来问题的,是复制,编译,多次测试debug之后才能解决的...
如果代码不可复制或不完整,别人测试就需要花费更多的时间...
\documentclass[tikz,border=5pt]{standalone}
\makeatletter
\def\tikz@plot@samples@recalc#1:#2\relax{%
\pgfmathparse{#1}%
\let\tikz@temp@start=\pgfmathresult%
\pgfmathparse{#2}%
\let\tikz@temp@end=\pgfmathresult%
\pgfmathparse{\tikz@temp@start + (\tikz@temp@end - \tikz@temp@start) / (\tikz@plot@samples - 1)}
\edef\tikz@plot@samplesat{\tikz@temp@start, \pgfmathresult, ..., \tikz@temp@end, \tikz@temp@end}
}
\makeatother
\begin{document}
\begin{tikzpicture}[very thin,domain=-1:{2*sqrt(2)}]
\draw[-stealth] (-1.5,0)--(3,0)node[scale=0.7,right]{$x$};
\draw[-stealth] (0,-3)--(0,3)node[scale=0.7,left]{$y$};
\node[label={[anchor=north east,yshift=-.1em]$o$}] {};
\draw plot[samples=300] (\x,{sqrt(16/(\x+2)^2-(\x-2)^2)});
\draw plot[samples=300] (\x, {-sqrt(16/(\x+2)^2-(\x-2)^2)});
\end{tikzpicture}
\end{document}





















问 用`tikz`中的`polt`绘制`y=sqrt{16/(x+2)^2-(x-2)^2}`的图像时最右端部分无法闭合?