Skip to content

Commit 7d19b30

Browse files
committed
MAINT:
- changed line plot = config._get_param('bode', 'grid', plot, True) to config._get_param('bode', 'grid', plot, True) - changed logic in _determine_omega_vector: if Hz = True, omega_in is interpreted in Hz units (as it is with omega_limits) - jupyter notebook singular-values-plot.ipynb output fixed
1 parent 81f9ee7 commit 7d19b30

2 files changed

Lines changed: 27 additions & 103 deletions

File tree

control/freqplot.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def bode_plot(syslist, omega=None,
188188
deg = config._get_param('bode', 'deg', kwargs, _bode_defaults, pop=True)
189189
Hz = config._get_param('bode', 'Hz', kwargs, _bode_defaults, pop=True)
190190
grid = config._get_param('bode', 'grid', kwargs, _bode_defaults, pop=True)
191-
plot = config._get_param('bode', 'grid', plot, True)
191+
plot = config._get_param('bode', 'plot', plot, True)
192192
margins = config._get_param('bode', 'margins', margins, False)
193193
wrap_phase = config._get_param(
194194
'bode', 'wrap_phase', kwargs, _bode_defaults, pop=True)
@@ -1095,7 +1095,7 @@ def singular_values_plot(syslist, omega=None,
10951095
grid = config._get_param(
10961096
'singular_values_plot', 'grid', kwargs, _singular_values_plot_default, pop=True)
10971097
plot = config._get_param(
1098-
'singular_values_plot', 'grid', plot, True)
1098+
'singular_values_plot', 'plot', plot, True)
10991099
omega_num = config._get_param('freqplot', 'number_of_samples', omega_num)
11001100

11011101
# If argument was a singleton, turn it into a tuple
@@ -1249,8 +1249,9 @@ def _determine_omega_vector(syslist, omega_in, omega_limits, omega_num, Hz):
12491249
np.log10(omega_limits[1]),
12501250
num=omega_num, endpoint=True)
12511251
else:
1252-
omega_out = omega_in
1253-
1252+
omega_out = np.asarray(omega_in)
1253+
if Hz:
1254+
omega_out *= 2. * math.pi
12541255
return omega_out, omega_range_given
12551256

12561257

examples/singular-values-plot.ipynb

Lines changed: 22 additions & 99 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)