|
48 | 48 | # Packages used by this module |
49 | 49 | from functools import partial |
50 | 50 | import numpy as np |
51 | | -import matplotlib as mlt |
| 51 | +import matplotlib as mpl |
52 | 52 | import matplotlib.pyplot as plt |
53 | 53 | from scipy import array, poly1d, row_stack, zeros_like, real, imag |
54 | 54 | import scipy.signal # signal processing toolbox |
|
62 | 62 | # Default values for module parameters |
63 | 63 | _rlocus_defaults = { |
64 | 64 | 'rlocus.grid': True, |
65 | | - 'rlocus.plotstr': 'b' if int(mlt.__version__[0]) == 1 else 'C0', |
| 65 | + 'rlocus.plotstr': 'b' if int(mpl.__version__[0]) == 1 else 'C0', |
66 | 66 | 'rlocus.print_gain': True, |
67 | 67 | 'rlocus.plot': True |
68 | 68 | } |
@@ -167,7 +167,7 @@ def root_locus(sys, kvect=None, xlim=None, ylim=None, |
167 | 167 | "Clicked at: %10.4g%+10.4gj gain: %10.4g damp: %10.4g" % |
168 | 168 | (start_mat[0][0].real, start_mat[0][0].imag, |
169 | 169 | 1, -1 * start_mat[0][0].real / abs(start_mat[0][0])), |
170 | | - fontsize=12 if int(mlt.__version__[0]) == 1 else 10) |
| 170 | + fontsize=12 if int(mpl.__version__[0]) == 1 else 10) |
171 | 171 | fig.canvas.mpl_connect( |
172 | 172 | 'button_release_event', |
173 | 173 | partial(_RLClickDispatcher, sys=sys, fig=fig, |
@@ -573,7 +573,7 @@ def _RLFeedbackClicksPoint(event, sys, fig, ax_rlocus, sisotool=False): |
573 | 573 | fig.suptitle( |
574 | 574 | "Clicked at: %10.4g%+10.4gj gain: %10.4g damp: %10.4g" % |
575 | 575 | (s.real, s.imag, K.real, -1 * s.real / abs(s)), |
576 | | - fontsize=12 if int(mlt.__version__[0]) == 1 else 10) |
| 576 | + fontsize=12 if int(mpl.__version__[0]) == 1 else 10) |
577 | 577 |
|
578 | 578 | # Remove the previous line |
579 | 579 | _removeLine(label='gain_point', ax=ax_rlocus) |
|
0 commit comments