texlive[64902] Master/texmf-dist: bodeplot (2nov22)

commits+karl at tug.org commits+karl at tug.org
Wed Nov 2 23:02:31 CET 2022


Revision: 64902
          http://tug.org/svn/texlive?view=revision&revision=64902
Author:   karl
Date:     2022-11-02 23:02:31 +0100 (Wed, 02 Nov 2022)
Log Message:
-----------
bodeplot (2nov22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/bodeplot/README.md
    trunk/Master/texmf-dist/doc/latex/bodeplot/bodeplot.pdf
    trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx
    trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty

Modified: trunk/Master/texmf-dist/doc/latex/bodeplot/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bodeplot/README.md	2022-11-02 22:02:15 UTC (rev 64901)
+++ trunk/Master/texmf-dist/doc/latex/bodeplot/README.md	2022-11-02 22:02:31 UTC (rev 64902)
@@ -21,6 +21,8 @@
  - Support for complex poles and zeros.
  - Support for general stable and unstable second order transfer functions.
  - Support for both `gnuplot` (default) and `pgfplots` (package option `pgf`).
+ - Support for `rad/s` (default) and `Hz` (package option `Hz` or `pgf` key `frequency unit=Hz` for per-plot change) frequency units.
+ - Support for `deg` (default) and `rad` (package option `rad` or `pgf` key `phase unit=rad` for per-plot change) phase units.
  - Support for linear and asymptotic approximation of magnitude and phase plots of any transfer function given poles, zeros, and gain.
 
 Main Bode/Nyquist/Nichols commands:

Modified: trunk/Master/texmf-dist/doc/latex/bodeplot/bodeplot.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx	2022-11-02 22:02:15 UTC (rev 64901)
+++ trunk/Master/texmf-dist/source/latex/bodeplot/bodeplot.dtx	2022-11-02 22:02:31 UTC (rev 64902)
@@ -20,6 +20,7 @@
 %<package>\ProvidesPackage{bodeplot}
 %<package>\RequirePackage{pdftexcmds}
 %<package>\RequirePackage{ifplatform}
+%<package>\RequirePackage{environ}
 %<package>\RequirePackage{pgfplots}
 %<package>  \pgfplotsset{compat=1.18}
 %<package>  \usepgfplotslibrary{groupplots}
@@ -67,7 +68,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{1723}
+% \CheckSum{1726}
 %
 % \changes{v1.0}{2021/10/25}{Initial release}
 % \changes{v1.0.4}{2021/11/05}{Fixed unintended optional argument macro expansion}
@@ -81,7 +82,7 @@
 % \GetFileInfo{bodeplot.sty}
 % \DoNotIndex{\newcommand,\xdef,\gdef,\def,\edef,\addplot,\approx,\arabic,\opt,\typ,\obj,\else,\if at pgfarg,\if at Hzarg,\if at radarg,\if at declutterarg,\fi,\begin,\end,\feature,\footnotesize,\draw,\detokenize,\DeclareOption,\foreach,\ifdim,\ifodd,\Im,\Re,\let,\newif,\nextgroupplot,\noexpand,\expandafter,\unexpanded,\PackageError,\PackageWarning,\relax,\RequirePackage,\tikzset,\pgfmathsetmacro,\pgfmathtruncatemacro,\ProcessOptions}
 %
-% \title{The \textsf{bodeplot} package\\version 1.1.1}
+% \title{The \textsf{bodeplot} package\\version 1.1.2}
 % \author{Rushikesh Kamalapurkar \\ \texttt{rlkamalapurkar at gmail.com}}
 %
 % \maketitle
@@ -1160,6 +1161,7 @@
 % \begin{macro}{\PhSOZerosAsymp}
 % \begin{macro}{\PhSOZerosLin}
 % Consider a general second order transfer function $G(s) = \frac{1}{s^2 + a s + b}$. We start with true, linear, and asymptotic magnitude plots for this transfer function.
+% \changes{v1.1.2}{2022/10/29}{Fix scaling bug introduced in v1.1.1}
 %    \begin{macrocode}
 \newcommand*{\MagSOPoles}[2]{
   (-20*log10(sqrt(\n at pow{#2 - \n at pow{t}{2}}{2} + \n at pow{#1*t}{2})))}
@@ -1172,10 +1174,10 @@
 \newcommand*{\PhSOPoles}[2]{((-atan2((#1)*t,((#2) - \n at pow{t}{2})))*\ph at scale)}
 \newcommand*{\PhSOPolesLin}[2]{((#2>0 ?
   \PhCSPolesLin{(#1/(2*sqrt(#2)))}{(sqrt(#2))} :
-  (#1>0 ? -pi : pi))*\ph at scale)}
+  (#1>0 ? -pi : pi)))}
 \newcommand*{\PhSOPolesAsymp}[2]{((#2>0 ?
   \PhCSPolesAsymp{(#1/(2*sqrt(#2)))}{(sqrt(#2))} :
-  (#1>0 ? -pi : pi))*\ph at scale)}
+  (#1>0 ? -pi : pi)))}
 %    \end{macrocode}
 % Plots of the inverse function $G(s)=s^2+as+b$ are defined to be negative of plots of poles. The |0-| is necessary due to a bug in |gnuplot| (fixed in version 5.4, patchlevel 3).
 %    \begin{macrocode}
@@ -1459,9 +1461,9 @@
 %    \end{macrocode}
 %\end{macro}
 % \begin{environment}{BodePhPlot}
-% An environment to host phase plot macros that pass parametric functions to |\addplot| macros. Uses the defaults specified in |bode at style| to create a shortcut that includes the |tikzpicture| and |semilogaxis| environments.\changes{v1.1.0}{2022/07/20}{Added separate environments for phase and magnitude plots}\changes{v1.1.1}{2022/07/31}{Enabled `Hz' and `rad' units for frequency and phase, respectively}
+% An environment to host phase plot macros that pass parametric functions to |\addplot| macros. Uses the defaults specified in |bode at style| to create a shortcut that includes the |tikzpicture| and |semilogaxis| environments.\changes{v1.1.0}{2022/07/20}{Added separate environments for phase and magnitude plots}\changes{v1.1.1}{2022/07/31}{Enabled `Hz' and `rad' units for frequency and phase, respectively}\changes{v1.1.2}{2022/10/29}{Defined using the `NewEnviron' command from the `environ' package to fix conflicts with externalization}
 %    \begin{macrocode}
-\newenvironment{BodePhPlot}[3][]{
+\NewEnviron{BodePhPlot}[3][]{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]
     \noexpand\begin{semilogxaxis}[
@@ -1476,7 +1478,7 @@
     ]
   }
   \temp at cmd
-}{
+      \BODY
     \end{semilogxaxis}
   \end{tikzpicture}
 }
@@ -1483,9 +1485,9 @@
 %    \end{macrocode}
 % \end{environment}
 % \begin{environment}{BodeMagPlot}
-% An environment to host magnitude plot macros that pass parametric functions to |\addplot| macros. Uses the defaults specified in |bode at style| to create a shortcut that includes the |tikzpicture| and |semilogaxis| environments.\changes{v1.1.0}{2022/07/20}{Added separate environments for phase and magnitude plots}\changes{v1.1.1}{2022/07/31}{Enabled `Hz' and `rad' units for frequency and phase, respectively}
+% An environment to host magnitude plot macros that pass parametric functions to |\addplot| macros. Uses the defaults specified in |bode at style| to create a shortcut that includes the |tikzpicture| and |semilogaxis| environments.\changes{v1.1.0}{2022/07/20}{Added separate environments for phase and magnitude plots}\changes{v1.1.1}{2022/07/31}{Enabled `Hz' and `rad' units for frequency and phase, respectively}\changes{v1.1.2}{2022/10/29}{Defined using the `NewEnviron' command from the `environ' package to fix conflicts with externalization}
 %    \begin{macrocode}
-\newenvironment{BodeMagPlot}[3][]{
+\NewEnviron{BodeMagPlot}[3][]{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]
     \noexpand\begin{semilogxaxis}[
@@ -1500,7 +1502,7 @@
     ]
   }
   \temp at cmd
-}{
+      \BODY
     \end{semilogxaxis}
   \end{tikzpicture}
 }
@@ -1507,9 +1509,9 @@
 %    \end{macrocode}
 % \end{environment}
 % \begin{environment}{BodePlot}
-% Same as |BodeMagPlot|. The |BodePlot| environment is deprecated as of v1.1.0, please use the |BodePhPlot| and |BodeMagPlot| environments instead.\changes{v1.0.3}{2021/11/03}{Added tikz option to environments}\changes{v1.1.0}{2022/02/20}{Deprecated BodePlot environment}\changes{v1.1.1}{2022/07/31}{Enabled `Hz' and `rad' units for frequency and phase, respectively}
+% Same as |BodeMagPlot|. The |BodePlot| environment is deprecated as of v1.1.0, please use the |BodePhPlot| and |BodeMagPlot| environments instead.\changes{v1.0.3}{2021/11/03}{Added tikz option to environments}\changes{v1.1.0}{2022/02/20}{Deprecated BodePlot environment}\changes{v1.1.1}{2022/07/31}{Enabled `Hz' and `rad' units for frequency and phase, respectively}\changes{v1.1.2}{2022/10/29}{Defined using the `NewEnviron' command from the `environ' package to fix conflicts with externalization}
 %    \begin{macrocode}
-\newenvironment{BodePlot}[3][]{
+\NewEnviron{BodePlot}[3][]{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]
     \noexpand\begin{semilogxaxis}[
@@ -1523,7 +1525,7 @@
     ]
   }
   \temp at cmd
-}{
+      \BODY
     \end{semilogxaxis}
   \end{tikzpicture}
 }
@@ -1896,9 +1898,9 @@
 %    \end{macrocode}
 %\end{macro}
 %\begin{macro}{NyquistPlot}
-% An environment to host |\addNyquist...| macros that pass parametric functions to |\addplot|. Uses the defaults specified in |bode at style| to create a shortcut that includes the |tikzpicture| and |axis| environments. \changes{v1.0.3}{2021/11/03}{Added tikz option to environments}
+% An environment to host |\addNyquist...| macros that pass parametric functions to |\addplot|. Uses the defaults specified in |bode at style| to create a shortcut that includes the |tikzpicture| and |axis| environments. \changes{v1.0.3}{2021/11/03}{Added tikz option to environments}\changes{v1.1.2}{2022/10/29}{Defined using the `NewEniron' command from the `environ' package to fix conflicts with externalization}
 %    \begin{macrocode}
-\newenvironment{NyquistPlot}[3][]{
+\NewEnviron{NyquistPlot}[3][]{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]
     \noexpand\begin{axis}[
@@ -1911,8 +1913,8 @@
     ]
   }
   \temp at cmd
-    \addplot [only marks,mark=+,thick,red] (-1 , 0);
-}{
+      \addplot [only marks,mark=+,thick,red] (-1 , 0);
+      \BODY
     \end{axis}
   \end{tikzpicture}
 }
@@ -1956,7 +1958,7 @@
 % \begin{macro}{\NicholsTF}
 % \changes{v1.0.3}{2021/11/03}{Added commands and tikz options}
 % \begin{macro}{NicholsChart}
-% \changes{v1.0.3}{2021/11/03}{Added tikz option to environments}
+% \changes{v1.0.3}{2021/11/03}{Added tikz option to environments}\changes{v1.1.2}{2022/10/29}{Defined using the `NewEniron' command from the `environ' package to fix conflicts with externalization}
 % \begin{macro}{\addNicholsZPKChart}
 % \begin{macro}{\addNicholsTFChart}
 % These macros and the |NicholsChart| environment generate Nichols charts, and they are implemented similar to their Nyquist counterparts.\changes{v1.1.1}{2022/07/31}{Enabled `Hz' and `rad' units for frequency and phase, respectively}
@@ -2041,7 +2043,7 @@
     \end{axis}
   \end{tikzpicture}
 }
-\newenvironment{NicholsChart}[3][]{
+\NewEnviron{NicholsChart}[3][]{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]
     \noexpand\begin{axis}[
@@ -2054,7 +2056,7 @@
     ]
   }
   \temp at cmd
-}{
+      \BODY
     \end{axis}
   \end{tikzpicture}
 }
@@ -2115,4 +2117,4 @@
 % \end{macro}
 % \end{macro}
 % \Finale
-\endinput
\ No newline at end of file
+\endinput

Modified: trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty	2022-11-02 22:02:15 UTC (rev 64901)
+++ trunk/Master/texmf-dist/tex/latex/bodeplot/bodeplot.sty	2022-11-02 22:02:31 UTC (rev 64902)
@@ -18,6 +18,7 @@
 \ProvidesPackage{bodeplot}
 \RequirePackage{pdftexcmds}
 \RequirePackage{ifplatform}
+\RequirePackage{environ}
 \RequirePackage{pgfplots}
   \pgfplotsset{compat=1.18}
   \usepgfplotslibrary{groupplots}
@@ -206,10 +207,10 @@
 \newcommand*{\PhSOPoles}[2]{((-atan2((#1)*t,((#2) - \n at pow{t}{2})))*\ph at scale)}
 \newcommand*{\PhSOPolesLin}[2]{((#2>0 ?
   \PhCSPolesLin{(#1/(2*sqrt(#2)))}{(sqrt(#2))} :
-  (#1>0 ? -pi : pi))*\ph at scale)}
+  (#1>0 ? -pi : pi)))}
 \newcommand*{\PhSOPolesAsymp}[2]{((#2>0 ?
   \PhCSPolesAsymp{(#1/(2*sqrt(#2)))}{(sqrt(#2))} :
-  (#1>0 ? -pi : pi))*\ph at scale)}
+  (#1>0 ? -pi : pi)))}
 \newcommand*{\MagSOZeros}{0-\MagSOPoles}
 \newcommand*{\MagSOZerosLin}{0-\MagSOPolesLin}
 \newcommand*{\MagSOZerosAsymp}{0-\MagSOPolesAsymp}
@@ -433,7 +434,7 @@
     };
   \fi
 }
-\newenvironment{BodePhPlot}[3][]{
+\NewEnviron{BodePhPlot}[3][]{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]
     \noexpand\begin{semilogxaxis}[
@@ -448,11 +449,11 @@
     ]
   }
   \temp at cmd
-}{
+      \BODY
     \end{semilogxaxis}
   \end{tikzpicture}
 }
-\newenvironment{BodeMagPlot}[3][]{
+\NewEnviron{BodeMagPlot}[3][]{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]
     \noexpand\begin{semilogxaxis}[
@@ -467,11 +468,11 @@
     ]
   }
   \temp at cmd
-}{
+      \BODY
     \end{semilogxaxis}
   \end{tikzpicture}
 }
-\newenvironment{BodePlot}[3][]{
+\NewEnviron{BodePlot}[3][]{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]
     \noexpand\begin{semilogxaxis}[
@@ -485,7 +486,7 @@
     ]
   }
   \temp at cmd
-}{
+      \BODY
     \end{semilogxaxis}
   \end{tikzpicture}
 }
@@ -807,7 +808,7 @@
     };
   \fi
 }
-\newenvironment{NyquistPlot}[3][]{
+\NewEnviron{NyquistPlot}[3][]{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]
     \noexpand\begin{axis}[
@@ -820,8 +821,8 @@
     ]
   }
   \temp at cmd
-    \addplot [only marks,mark=+,thick,red] (-1 , 0);
-}{
+      \addplot [only marks,mark=+,thick,red] (-1 , 0);
+      \BODY
     \end{axis}
   \end{tikzpicture}
 }
@@ -931,7 +932,7 @@
     \end{axis}
   \end{tikzpicture}
 }
-\newenvironment{NicholsChart}[3][]{
+\NewEnviron{NicholsChart}[3][]{
   \parse at env@opt{#1}
   \edef\temp at cmd{\noexpand\begin{tikzpicture} [\unexpanded\expandafter{\opt at tikz}]
     \noexpand\begin{axis}[
@@ -944,7 +945,7 @@
     ]
   }
   \temp at cmd
-}{
+      \BODY
     \end{axis}
   \end{tikzpicture}
 }



More information about the tex-live-commits mailing list.