@@ -433,8 +433,9 @@ def gen_zero_centered_series(val_min, val_max, period):
433
433
# Nyquist plot
434
434
#
435
435
436
- def nyquist_plot (syslist , omega = None , Plot = True , color = None ,
437
- labelFreq = 0 , * args , ** kwargs ):
436
+ def nyquist_plot (syslist , omega = None , Plot = True ,
437
+ labelFreq = 0 , arrowhead_length = 0.1 , arrowhead_width = 0.1 ,
438
+ color = None , * args , ** kwargs ):
438
439
"""
439
440
Nyquist plot for a system
440
441
@@ -452,6 +453,8 @@ def nyquist_plot(syslist, omega=None, Plot=True, color=None,
452
453
Used to specify the color of the plot
453
454
labelFreq : int
454
455
Label every nth frequency on the plot
456
+ arrowhead_width : arrow head width
457
+ arrowhead_length : arrow head length
455
458
*args
456
459
Additional arguments for :func:`matplotlib.plot` (color, linestyle, etc)
457
460
**kwargs:
@@ -511,12 +514,14 @@ def nyquist_plot(syslist, omega=None, Plot=True, color=None,
511
514
ax = plt .gca ()
512
515
# Plot arrow to indicate Nyquist encirclement orientation
513
516
ax .arrow (x [0 ], y [0 ], (x [1 ]- x [0 ])/ 2 , (y [1 ]- y [0 ])/ 2 , fc = c , ec = c ,
514
- head_width = 0.2 , head_length = 0.2 )
517
+ head_width = arrowhead_width ,
518
+ head_length = arrowhead_length )
515
519
516
520
plt .plot (x , - y , '-' , color = c , * args , ** kwargs )
517
521
ax .arrow (
518
522
x [- 1 ], - y [- 1 ], (x [- 1 ]- x [- 2 ])/ 2 , (y [- 1 ]- y [- 2 ])/ 2 ,
519
- fc = c , ec = c , head_width = 0.2 , head_length = 0.2 )
523
+ fc = c , ec = c , head_width = arrowhead_width ,
524
+ head_length = arrowhead_length )
520
525
521
526
# Mark the -1 point
522
527
plt .plot ([- 1 ], [0 ], 'r+' )
0 commit comments