%20%E5%9B%BE%E5%BD%A2%E7%9A%84%E5%9E%82%E7%9B%B4%E6%B8%90%E8%BF%91%E7%BA%BF%EF%BC%9F.png)
由于垂直渐近线只会给图形增加干扰,所以我想将它们删除。
\documentclass[border=24pt,12pt,pstricks]{standalone}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}[algebraic](0,-3)(6.6,3)
\psaxes{->}(0,0)(0,-3)(6.5,3)[$x$,0][$y$,90]
\begin{psclip}{\psframe[linestyle=none,linewidth=0](0,-3)(6.28,3)}
\psplot{0}{6.28}{tan(x)}
\end{psclip}
\end{pspicture}
\end{document}
注意:我不想psplot
多次调用。我知道一种解决方案是将域拆分成几部分,但这不是我需要的。
答案1
您可以添加选项 yMaxValue=4 来消除无限值
\documentclass[border=24pt,12pt,pstricks]{standalone}
\usepackage{pst-plot}
\begin{document}
\begin{pspicture}[algebraic](0,-3)(6.6,3)
\psaxes{->}(0,0)(0,-3)(6.5,3)[$x$,0][$y$,90]
\begin{psclip}{\psframe[linestyle=none,linewidth=0](0,-3)(6.28,3)}
\psplot[yMaxValue=4]{0}{6.28}{tan(x)}
\end{psclip}
\end{pspicture}
\end{document}