|
2 | 2 | import numpy as np |
3 | 3 | from control.sisotool import sisotool |
4 | 4 | from control.tests.margin_test import assert_array_almost_equal |
5 | | -from control.rlocus import _RLFeedbackClicksSisotool |
| 5 | +from control.rlocus import _RLClickDispatcher |
6 | 6 | from control.xferfcn import TransferFunction |
7 | 7 | import matplotlib.pyplot as plt |
8 | 8 |
|
@@ -49,12 +49,14 @@ def test_sisotool(self): |
49 | 49 |
|
50 | 50 | # Move the rootlocus to another point |
51 | 51 | event = type('test', (object,), {'xdata': 2.31206868287,'ydata':15.5983051046, 'inaxes':ax_rlocus.axes})() |
52 | | - _RLFeedbackClicksSisotool(event=event, sys=self.system, fig=fig, bode_plot_params=bode_plot_params, tvect=None) |
| 52 | + _RLClickDispatcher(event=event, sys=self.system, fig=fig,ax_rlocus=ax_rlocus,sisotool=True, plotstr='-' ,bode_plot_params=bode_plot_params, tvect=None) |
53 | 53 |
|
54 | 54 | # Check the moved root locus plot points |
55 | 55 | moved_point_0 = (np.array([-29.91742755]), np.array([0.])) |
56 | 56 | moved_point_1 = (np.array([2.45871378]), np.array([-15.52647768])) |
57 | 57 | moved_point_2 = (np.array([2.45871378]), np.array([15.52647768])) |
| 58 | + for line in ax_rlocus.lines: |
| 59 | + print(line.get_data()) |
58 | 60 | assert_array_almost_equal(ax_rlocus.lines[-3].get_data(),moved_point_0) |
59 | 61 | assert_array_almost_equal(ax_rlocus.lines[-2].get_data(),moved_point_1) |
60 | 62 | assert_array_almost_equal(ax_rlocus.lines[-1].get_data(),moved_point_2) |
|
0 commit comments