2

When I try to plot the Bode using the manual of bodegraph package, I notice the phase plot isn't straight (when vertical), see enter image description here

So I have used const plot option and the vertical part of phase plot is straight, but magnitude plot is not smooth anymore, see enter image description here

Is is possible to keep the magnitude plot smooth, while at the same time the phase plot has vertical part?

This is the 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 Answer 1

2

Disclaimer: I have no experience in Bodegraph. So please don't grill me if this proposal is useless. ;-)

However, I do now that one may use samples at in order to get plots consisting just of straight lines.

\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}

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .