We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ae2886 commit c3e199eCopy full SHA for c3e199e
control/freqplot.py
@@ -395,7 +395,15 @@ def nyquist_plot(syslist, omega=None, Plot=True, color=None, labelFreq=0, *args,
395
# Plot the primary curve and mirror image
396
p = plt.plot(x, y, '-', color=color, *args, **kwargs)
397
c = p[0].get_color()
398
+ ax = plt.gca()
399
+ # Plot arrow to indicate Nyquist encirclement orientation
400
+ ax.arrow(x[0], y[0], (x[1]-x[0])/2, (y[1]-y[0])/2, fc=c, ec=c,
401
+ head_width=0.2, head_length=0.2)
402
+
403
plt.plot(x, -y, '-', color=c, *args, **kwargs)
404
+ ax.arrow(x[-1], -y[-1], (x[-1]-x[-2])/2, (y[-1]-y[-2])/2, fc=c, ec=c,
405
406
407
# Mark the -1 point
408
plt.plot([-1], [0], 'r+')
409
@@ -426,6 +434,7 @@ def nyquist_plot(syslist, omega=None, Plot=True, color=None, labelFreq=0, *args,
426
434
ax = plt.gca()
427
435
ax.set_xlabel("Real axis")
428
436
ax.set_ylabel("Imaginary axis")
437
+ ax.grid(color="lightgray")
429
438
430
439
return x, y, omega
431
440
0 commit comments