Skip to content

Commit c2b00c3

Browse files
committed
avoid xlim warning in freqresp_test
1 parent 4103688 commit c2b00c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

control/tests/freqresp_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ def test_initial_phase(TF, initial_phase, default_phase, expected_phase):
305305

306306
# Make sure everything works in rad/sec as well
307307
if initial_phase:
308-
plt.clf() # clear previous figure (speeds things up)
308+
plt.xscale('linear') # avoids xlim warning on next line
309+
plt.clf() # clear previous figure (speeds things up)
309310
mag, phase, omega = ctrl.bode(
310311
TF, initial_phase=initial_phase/180. * math.pi, deg=False)
311312
assert(abs(phase[0] - expected_phase) < 0.1)

0 commit comments

Comments
 (0)