Skip to content

Commit 5de0899

Browse files
authored
formatting is retained
1 parent f5f05bd commit 5de0899

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

control/freqplot.py

+5-11
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ def gen_zero_centered_series(val_min, val_max, period):
424424
# Nyquist plot
425425
#
426426

427-
428427
def nyquist_plot(syslist, omega=None, Plot=True,
429428
labelFreq=0, hl=0.1, hw=0.1, color=None, *args, **kwargs):
430429
"""
@@ -499,11 +498,11 @@ def nyquist_plot(syslist, omega=None, Plot=True,
499498
c = p[0].get_color()
500499
ax = plt.gca()
501500
# Plot arrow to indicate Nyquist encirclement orientation
502-
ax.arrow(x[0], y[0], ((x[1]-x[0])/2), ((y[1]-y[0])/2), fc=c, ec=c,
503-
head_width=hw, head_length=hl, color=color)
501+
ax.arrow(x[0], y[0], ((x[1]-x[0])/2), ((y[1]-y[0])/2),
502+
fc=c, ec=c, head_width=hw, head_length=hl,
503+
color=color)
504504

505-
plt.plot(x, -y, '-', color=color, *args, **kwargs)
506-
# plt.figure()
505+
plt.plot(x, -y, '-', color=c, *args, **kwargs)
507506
ax.arrow(
508507
x[-1], -y[-1], ((x[-1]-x[-2])/2), ((y[-1]-y[-2])/2),
509508
fc=c, ec=c, head_width=hw, head_length=hl, color=color)
@@ -548,8 +547,6 @@ def nyquist_plot(syslist, omega=None, Plot=True,
548547
#
549548

550549
# TODO: think about how (and whether) to handle lists of systems
551-
552-
553550
def gangof4_plot(P, C, omega=None, **kwargs):
554551
"""Plot the "Gang of 4" transfer functions for a system
555552
Generates a 2x2 plot showing the "Gang of 4" sensitivity functions
@@ -650,8 +647,6 @@ def gangof4_plot(P, C, omega=None, **kwargs):
650647
#
651648

652649
# Compute reasonable defaults for axes
653-
654-
655650
def default_frequency_range(syslist, Hz=None, number_of_samples=None,
656651
feature_periphery_decades=None):
657652
"""Compute a reasonable default frequency range for frequency
@@ -772,7 +767,6 @@ def default_frequency_range(syslist, Hz=None, number_of_samples=None,
772767
# KLD 5/23/11: Two functions to create nice looking labels
773768
#
774769

775-
776770
def get_pow1000(num):
777771
"""Determine exponent for which significand of a number is within the
778772
range [1, 1000).
@@ -824,4 +818,4 @@ def find_nearest_omega(omega_list, omega):
824818
# Function aliases
825819
bode = bode_plot
826820
nyquist = nyquist_plot
827-
gangof4 = gangof4_plot
821+
gangof4 = gangof4_plot

0 commit comments

Comments
 (0)