`bodegraph` 不再流畅

`bodegraph` 不再流畅

当我尝试使用软件包手册绘制 Bode 时bodegraph,我注意到相位图不是直线(垂直时),请参见 在此处输入图片描述

因此,我使用了const plot选项,并且相位图的垂直部分是直的,但是幅度图不再平滑,请参见 在此处输入图片描述

是否有可能保持幅度图平滑,同时相位图具有垂直部分?

这是 MWE

\documentclass{article}
\usepackage{bodegraph}
\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}[xscale=7/4]
    \begin{scope}[yscale=3/40]
    \semilog{-2}{2}{-20}{20}
    \BodeGraph[asymp lines,samples=100]{-2:2}
    {\POAmpAsymp{6}{0.3}}
    \BodeGraph{-2:2}{\POAmp{6}{0.3}}
    \end{scope}
    \begin{scope}[yshift=-2.5cm,yscale=3/90]
    \semilog{-2}{2}{-90}{0}
    \BodeGraph[asymp lines,samples=100]{-2:2}
    {\POArgAsymp{6}{0.3}}
    \BodeGraph{-2:2}{\POArg{6}{0.3}}
    \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}[xscale=7/4]
    \begin{scope}[yscale=3/40]
    \semilog{-2}{2}{-20}{20}
    \BodeGraph[asymp lines,samples=100,const plot]{-2:2}
    {\POAmpAsymp{6}{0.3}}
    \BodeGraph{-2:2}{\POAmp{6}{0.3}}
    \end{scope}
    \begin{scope}[yshift=-2.5cm,yscale=3/90]
    \semilog{-2}{2}{-90}{0}
    \BodeGraph[asymp lines,samples=100, const plot]{-2:2}
    {\POArgAsymp{6}{0.3}}
    \BodeGraph{-2:2}{\POArg{6}{0.3}}
    \end{scope}
    \end{tikzpicture}
\end{document}

答案1

免责声明:我没有使用 Bodegraph 的经验。所以如果这个建议没用,请不要责备我。;-)

然而,我现在知道可以使用它samples at来获得仅由直线组成的图。

\documentclass{article}
\usepackage{bodegraph}
\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}[xscale=7/4]
    \begin{scope}[yscale=3/40]
    \semilog{-2}{2}{-20}{20}
    \BodeGraph[asymp lines,samples=100]{-2:2}
    {\POAmpAsymp{6}{0.3}}
    \BodeGraph{-2:2}{\POAmp{6}{0.3}}
    \end{scope}
    \begin{scope}[yshift=-2.5cm,yscale=3/90]
    \semilog{-2}{2}{-90}{0}
    \BodeGraph[asymp lines,samples=100]{-2:2}
    {\POArgAsymp{6}{0.3}}
    \BodeGraph{-2:2}{\POArg{6}{0.3}}
    \end{scope}
    \end{tikzpicture}
    \begin{tikzpicture}[xscale=7/4]
    \begin{scope}[yscale=3/40]
    \semilog{-2}{2}{-20}{20}
    \BodeGraph[asymp lines,samples at={-2,0,2}]{-2:2}
    {\POAmpAsymp{6}{0.3}}
    \BodeGraph{-2:2}{\POAmp{6}{0.3}}
    \end{scope}
    \begin{scope}[yshift=-2.5cm,yscale=3/90]
    \semilog{-2}{2}{-90}{0}
    \BodeGraph[asymp lines,samples=100, const plot]{-2:2}
    {\POArgAsymp{6}{0.3}}
    \BodeGraph{-2:2}{\POArg{6}{0.3}}
    \end{scope}
    \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容