Skip to content

Commit d13f1ed

Browse files
committed
Fix root_locus() handling of ax parameter
1 parent 346bc40 commit d13f1ed

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

control/rlocus.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def root_locus(sys, kvect=None, xlim=None, ylim=None,
260260
if isdtime(sys, strict=True):
261261
zgrid(ax=ax)
262262
else:
263-
_sgrid_func(fig=fig if sisotool else None)
263+
_sgrid_func(ax)
264264
else:
265265
ax.axhline(0., linestyle=':', color='k', linewidth=.75, zorder=-20)
266266
ax.axvline(0., linestyle=':', color='k', linewidth=.75, zorder=-20)
@@ -660,13 +660,7 @@ def _removeLine(label, ax):
660660
del line
661661

662662

663-
def _sgrid_func(fig=None, zeta=None, wn=None):
664-
if fig is None:
665-
fig = plt.gcf()
666-
ax = fig.gca()
667-
else:
668-
ax = fig.axes[1]
669-
663+
def _sgrid_func(ax, zeta=None, wn=None):
670664
# Get locator function for x-axis, y-axis tick marks
671665
xlocator = ax.get_xaxis().get_major_locator()
672666
ylocator = ax.get_yaxis().get_major_locator()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy