@@ -114,7 +114,7 @@ def bode_plot(syslist, omega=None,
114
114
Additional arguments for `matplotlib` plots (color, linestyle, etc)
115
115
**kwargs : `matplotlib` plot keyword properties, optional
116
116
Additional keywords (passed to `matplotlib`)
117
- w
117
+
118
118
Returns
119
119
-------
120
120
mag : array (list if len(syslist) > 1)
@@ -442,7 +442,7 @@ def gen_zero_centered_series(val_min, val_max, period):
442
442
# Nyquist plot
443
443
#
444
444
445
- def nyquist_plot (syslist , omega = None , plot = True , labelFreq = 0 ,
445
+ def nyquist_plot (syslist , omega = None , plot = True , label_freq = 0 ,
446
446
arrowhead_length = 0.1 , arrowhead_width = 0.1 ,
447
447
color = None , * args , ** kwargs ):
448
448
"""
@@ -460,7 +460,7 @@ def nyquist_plot(syslist, omega=None, plot=True, labelFreq=0,
460
460
If True, plot magnitude
461
461
color : string
462
462
Used to specify the color of the plot
463
- labelFreq : int
463
+ label_freq : int
464
464
Label every nth frequency on the plot
465
465
arrowhead_width : arrow head width
466
466
arrowhead_length : arrow head length
@@ -492,6 +492,14 @@ def nyquist_plot(syslist, omega=None, plot=True, labelFreq=0,
492
492
# Map 'Plot' keyword to 'plot' keyword
493
493
plot = kwargs .pop ('Plot' )
494
494
495
+ # Check to see if legacy 'labelFreq' keyword was used
496
+ if 'labelFreq' in kwargs :
497
+ import warnings
498
+ warnings .warn ("'labelFreq' keyword is deprecated in nyquist_plot; "
499
+ "use 'label_freq'" , FutureWarning )
500
+ # Map 'labelFreq' keyword to 'label_freq' keyword
501
+ label_freq = kwargs .pop ('labelFreq' )
502
+
495
503
# If argument was a singleton, turn it into a list
496
504
if not getattr (syslist , '__iter__' , False ):
497
505
syslist = (syslist ,)
@@ -544,8 +552,8 @@ def nyquist_plot(syslist, omega=None, plot=True, labelFreq=0,
544
552
plt .plot ([- 1 ], [0 ], 'r+' )
545
553
546
554
# Label the frequencies of the points
547
- if labelFreq :
548
- ind = slice (None , None , labelFreq )
555
+ if label_freq :
556
+ ind = slice (None , None , label_freq )
549
557
for xpt , ypt , omegapt in zip (x [ind ], y [ind ], omega [ind ]):
550
558
# Convert to Hz
551
559
f = omegapt / (2 * sp .pi )
0 commit comments