regelungstechnik.py
def plot(self, pick=None):
        """
        Returns matplotlib figure of the bode diagram.
        """
        fig, ax_amp = plt.subplots(figsize=(8, 4.5), dpi=240)
        fig.subplots_adjust(left=0.125, right=0.875, bottom=0.15, top=0.95)
        ax_phi = ax_amp.twinx()

        ax_amp.set_xscale("log")
        ax_phi.set_xscale("log")

        amps = np.asarray(self.amps)
        phis = np.asarray(self.phis)
        labels = np.asarray(self.labels)
        colors = np.asarray(self.colors)

        canvas = False

        if pick is not None:
            pick = np.asarray(pick, dtype=int)
            if pick.size == 0 or len(amps) == 0:
                canvas = True
            amps = amps[pick]
            phis = phis[pick]
            labels = labels[pick]
            colors = colors[pick]

        for amp, phi, label, color in zip(amps, phis, labels, colors):
            amp_label = r"$|$" + label + r"$|$"
            phi_label = r"$\varphi ($" + label + r"$)$"

            ax_amp.plot(self.omega, amp, label=amp_label,
                       color=color, linewidth=2)
            ax_phi.plot(self.omega, phi, label=phi_label,
                        color=color, linewidth=2, linestyle=":")

        ax_amp.set_xlim(self.omega[0], self.omega[-1])

        ax_amp.set_ylim([self.amp_ticks[0], self.amp_ticks[-1]])
        ax_amp.set_yticks(self.amp_ticks)

        ax_phi.set_ylim([self.phi_ticks[0], self.phi_ticks[-1]])
        ax_phi.set_yticks(self.phi_ticks)

        x_label = r"Circular Frequency "
        amp_label = r"Amplitude "
        phi_label = r"Phase "

        if self.lang == "DE":
            x_label = r"Kreisfrequenz "
            amp_label = r"Betrag "
            phi_label = r"Phase "

        x_label += r"$\ \omega \ / \ \frac{1}{s}$"
        amp_label += r"$\ |H(j \omega)| \ / \ dB$"
        phi_label += r"$\ \varphi(H(j \omega)) \ / \ ^\circ$"

        ax_amp.set_xlabel(x_label)
        ax_amp.set_ylabel(amp_label)
        ax_phi.set_ylabel(phi_label)

        if not canvas:
            ax_amp.legend(loc="upper left")
            ax_phi.legend(loc="upper right")

        ax_amp.grid(b=True, which="both", axis="both")

        return fig

        Returns matplotlib figure of the bode diagram.
        
Returns matplotlib figure of the bode diagram.
Returns matplotlib figure of the bode diagram .
def plot(self, pick=None):
        fig, ax_amp = plt.subplots(figsize=(8, 4.5), dpi=240)
        fig.subplots_adjust(left=0.125, right=0.875, bottom=0.15, top=0.95)
        ax_phi = ax_amp.twinx()
        ax_amp.set_xscale("log")
        ax_phi.set_xscale("log")
        amps = np.asarray(self.amps)
        phis = np.asarray(self.phis)
        labels = np.asarray(self.labels)
        colors = np.asarray(self.colors)
        canvas = False
        if pick is not None:
            pick = np.asarray(pick, dtype=int)
            if pick.size == 0 or len(amps) == 0:
                canvas = True
            amps = amps[pick]
            phis = phis[pick]
            labels = labels[pick]
            colors = colors[pick]
        for amp, phi, label, color in zip(amps, phis, labels, colors):
            amp_label = r"$|$" + label + r"$|$"
            phi_label = r"$\varphi ($" + label + r"$)$"
            ax_amp.plot(self.omega, amp, label=amp_label,
                       color=color, linewidth=2)
            ax_phi.plot(self.omega, phi, label=phi_label,
                        color=color, linewidth=2, linestyle=":")
        ax_amp.set_xlim(self.omega[0], self.omega[-1])
        ax_amp.set_ylim([self.amp_ticks[0], self.amp_ticks[-1]])
        ax_amp.set_yticks(self.amp_ticks)
        ax_phi.set_ylim([self.phi_ticks[0], self.phi_ticks[-1]])
        ax_phi.set_yticks(self.phi_ticks)
        x_label = r"Circular Frequency "
        amp_label = r"Amplitude "
        phi_label = r"Phase "
        if self.lang == "DE":
            x_label = r"Kreisfrequenz "
            amp_label = r"Betrag "
            phi_label = r"Phase "
        x_label += r"$\ \omega \ / \ \frac{1}{s}$"
        amp_label += r"$\ |H(j \omega)| \ / \ dB$"
        phi_label += r"$\ \varphi(H(j \omega)) \ / \ ^\circ$"
        ax_amp.set_xlabel(x_label)
        ax_amp.set_ylabel(amp_label)
        ax_phi.set_ylabel(phi_label)
        if not canvas:
            ax_amp.legend(loc="upper left")
            ax_phi.legend(loc="upper right")
        ax_amp.grid(b=True, which="both", axis="both")
        return fig
def plot ( self , pick = None ) : fig , ax_amp = plt . subplots ( figsize = ( 8 , 4.5 ) , dpi = 240 ) fig . subplots_adjust ( left = 0.125 , right = 0.875 , bottom = 0.15 , top = 0.95 ) ax_phi = ax_amp . twinx ( ) ax_amp . set_xscale ( "log" ) ax_phi . set_xscale ( "log" ) amps = np . asarray ( self . amps ) phis = np . asarray ( self . phis ) labels = np . asarray ( self . labels ) colors = np . asarray ( self . colors ) canvas = False if pick is not None : pick = np . asarray ( pick , dtype = int ) if pick . size == 0 or len ( amps ) == 0 : canvas = True amps = amps [ pick ] phis = phis [ pick ] labels = labels [ pick ] colors = colors [ pick ] for amp , phi , label , color in zip ( amps , phis , labels , colors ) : amp_label = r"$|$" + label + r"$|$" phi_label = r"$\varphi ($" + label + r"$)$" ax_amp . plot ( self . omega , amp , label = amp_label , color = color , linewidth = 2 ) ax_phi . plot ( self . omega , phi , label = phi_label , color = color , linewidth = 2 , linestyle = ":" ) ax_amp . set_xlim ( self . omega [ 0 ] , self . omega [ - 1 ] ) ax_amp . set_ylim ( [ self . amp_ticks [ 0 ] , self . amp_ticks [ - 1 ] ] ) ax_amp . set_yticks ( self . amp_ticks ) ax_phi . set_ylim ( [ self . phi_ticks [ 0 ] , self . phi_ticks [ - 1 ] ] ) ax_phi . set_yticks ( self . phi_ticks ) x_label = r"Circular Frequency " amp_label = r"Amplitude " phi_label = r"Phase " if self . lang == "DE" : x_label = r"Kreisfrequenz " amp_label = r"Betrag " phi_label = r"Phase " x_label += r"$\ \omega \ / \ \frac{1}{s}$" amp_label += r"$\ |H(j \omega)| \ / \ dB$" phi_label += r"$\ \varphi(H(j \omega)) \ / \ ^\circ$" ax_amp . set_xlabel ( x_label ) ax_amp . set_ylabel ( amp_label ) ax_phi . set_ylabel ( phi_label ) if not canvas : ax_amp . legend ( loc = "upper left" ) ax_phi . legend ( loc = "upper right" ) ax_amp . grid ( b = True , which = "both" , axis = "both" ) return fig
Returns matplotlib figure of the bode diagram.
Returns matplotlib figure of the bode diagram .
"""
        Returns matplotlib figure of the bode diagram.
        """
self
pick