@@ -83,7 +83,9 @@ def bode_plot(syslist, omega=None,
8383 Plot = True , omega_limits = None , omega_num = None ,
8484 margins = None , * args , ** kwargs ):
8585 """Bode plot for a system
86+
8687 Plots a Bode plot for the system over a (optional) frequency range.
88+
8789 Parameters
8890 ----------
8991 syslist : linsys
@@ -112,6 +114,7 @@ def bode_plot(syslist, omega=None,
112114 Additional arguments for :func:`matplotlib.plot` (color, linestyle, etc)
113115 **kwargs:
114116 Additional keywords (passed to `matplotlib`)
117+
115118 Returns
116119 -------
117120 mag : array (list if len(syslist) > 1)
@@ -120,13 +123,15 @@ def bode_plot(syslist, omega=None,
120123 phase in radians
121124 omega : array (list if len(syslist) > 1)
122125 frequency in rad/sec
126+
123127 Other Parameters
124128 ----------------
125129 grid : bool
126130 If True, plot grid lines on gain and phase plots. Default is set by
127131 config.defaults['bode.grid'].
128132 The default values for Bode plot configuration parameters can be reset
129133 using the `config.defaults` dictionary, with module name 'bode'.
134+
130135 Notes
131136 -----
132137 1. Alternatively, you may use the lower-level method (mag, phase, freq)
@@ -136,10 +141,12 @@ def bode_plot(syslist, omega=None,
136141 along the upper branch of the unit circle, using the mapping z = exp(j
137142 \\ omega dt) where omega ranges from 0 to pi/dt and dt is the discrete
138143 timebase. If not timebase is specified (dt = True), dt is set to 1.
144+
139145 Examples
140146 --------
141147 >>> sys = ss("1. -2; 3. -4", "5.; 7", "6. 8", "9.")
142148 >>> mag, phase, omega = bode(sys)
149+
143150 """
144151 # Make a copy of the kwargs dictonary since we will modify it
145152 kwargs = dict (kwargs )
@@ -428,7 +435,9 @@ def nyquist_plot(syslist, omega=None, Plot=True,
428435 labelFreq = 0 , hl = 0.1 , hw = 0.1 , color = None , * args , ** kwargs ):
429436 """
430437 Nyquist plot for a system
438+
431439 Plots a Nyquist plot for the system over a (optional) frequency range.
440+
432441 Parameters
433442 ----------
434443 syslist : list of LTI
@@ -441,12 +450,11 @@ def nyquist_plot(syslist, omega=None, Plot=True,
441450 Used to specify the color of the plot
442451 labelFreq : int
443452 Label every nth frequency on the plot
444- hl : float (default 0.1), Head length of arrow
445- hw : float (default 0.1), Head width of arrow
446453 *args
447454 Additional arguments for :func:`matplotlib.plot` (color, linestyle, etc)
448455 **kwargs:
449456 Additional keywords (passed to `matplotlib`)
457+
450458 Returns
451459 -------
452460 real : array
@@ -455,10 +463,12 @@ def nyquist_plot(syslist, omega=None, Plot=True,
455463 imaginary part of the frequency response array
456464 freq : array
457465 frequencies
466+
458467 Examples
459468 --------
460469 >>> sys = ss("1. -2; 3. -4", "5.; 7", "6. 8", "9.")
461470 >>> real, imag, freq = nyquist_plot(sys)
471+
462472 """
463473 # If argument was a singleton, turn it into a list
464474 if not getattr (syslist , '__iter__' , False ):
@@ -549,14 +559,17 @@ def nyquist_plot(syslist, omega=None, Plot=True,
549559# TODO: think about how (and whether) to handle lists of systems
550560def gangof4_plot (P , C , omega = None , ** kwargs ):
551561 """Plot the "Gang of 4" transfer functions for a system
562+
552563 Generates a 2x2 plot showing the "Gang of 4" sensitivity functions
553564 [T, PS; CS, S]
565+
554566 Parameters
555567 ----------
556568 P, C : LTI
557569 Linear input/output systems (process and control)
558570 omega : array
559571 Range of frequencies (list or bounds) in rad/sec
572+
560573 Returns
561574 -------
562575 None
@@ -651,8 +664,10 @@ def default_frequency_range(syslist, Hz=None, number_of_samples=None,
651664 feature_periphery_decades = None ):
652665 """Compute a reasonable default frequency range for frequency
653666 domain plots.
667+
654668 Finds a reasonable default frequency range by examining the features
655669 (poles and zeros) of the systems in syslist.
670+
656671 Parameters
657672 ----------
658673 syslist : list of LTI
@@ -669,15 +684,18 @@ def default_frequency_range(syslist, Hz=None, number_of_samples=None,
669684 Defines how many decades shall be included in the frequency range on
670685 both sides of features (poles, zeros). The default value is read from
671686 ``config.defaults['freqplot.feature_periphery_decades']``.
687+
672688 Returns
673689 -------
674690 omega : array
675691 Range of frequencies in rad/sec
692+
676693 Examples
677694 --------
678695 >>> from matlab import ss
679696 >>> sys = ss("1. -2; 3. -4", "5.; 7", "6. 8", "9.")
680697 >>> omega = default_frequency_range(sys)
698+
681699 """
682700 # This code looks at the poles and zeros of all of the systems that
683701 # we are plotting and sets the frequency range to be one decade above
0 commit comments