@@ -324,8 +324,7 @@ def gen_zero_centered_series(val_min, val_max, period):
324
324
return mags , phases , omegas
325
325
326
326
327
- def nyquist_plot (syslist , omega = None , Plot = True , color = None ,
328
- labelFreq = 0 , * args , ** kwargs ):
327
+ def nyquist_plot (syslist , omega = None , Plot = True , color = None , labelFreq = 0 , * args , ** kwargs ):
329
328
"""
330
329
Nyquist plot for a system
331
330
@@ -377,6 +376,7 @@ def nyquist_plot(syslist, omega=None, Plot=True, color=None,
377
376
"or frequency vector. " )
378
377
omega = np .logspace (np .log10 (omega [0 ]), np .log10 (omega [1 ]),
379
378
num = 50 , endpoint = True , base = 10.0 )
379
+
380
380
for sys in syslist :
381
381
if sys .inputs > 1 or sys .outputs > 1 :
382
382
# TODO: Add MIMO nyquist plots.
@@ -419,9 +419,14 @@ def nyquist_plot(syslist, omega=None, Plot=True, color=None,
419
419
# np.round() is used because 0.99... appears
420
420
# instead of 1.0, and this would otherwise be
421
421
# truncated to 0.
422
- plt .text (xpt , ypt ,
423
- ' ' + str (int (np .round (f / 1000 ** pow1000 , 0 ))) +
424
- ' ' + prefix + 'Hz' )
422
+ plt .text (xpt , ypt , ' ' + str (int (np .round (f / 1000 ** pow1000 , 0 ))) + ' ' +
423
+ prefix + 'Hz' )
424
+
425
+ if Plot :
426
+ ax = plt .gca ()
427
+ ax .set_xlabel ("Real axis" )
428
+ ax .set_ylabel ("Imaginary axis" )
429
+
425
430
return x , y , omega
426
431
427
432
0 commit comments