Skip to content

Commit 39dee6f

Browse files
committed
simplify grid and sisotool logic
1 parent ca302d6 commit 39dee6f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

control/rlocus.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,11 @@ def root_locus(sys, kvect=None, xlim=None, ylim=None,
232232
ax.set_ylim(ylim)
233233

234234
# Draw the grid
235-
if grid and sisotool:
235+
if grid:
236236
if isdtime(sys, strict=True):
237237
zgrid(ax=ax)
238238
else:
239-
_sgrid_func(fig=fig)
240-
elif grid:
241-
if isdtime(sys, strict=True):
242-
zgrid(ax=ax)
243-
else:
244-
_sgrid_func()
239+
_sgrid_func(fig=fig if sisotool else None)
245240
else:
246241
ax.axhline(0., linestyle=':', color='k', linewidth=.75, zorder=-20)
247242
ax.axvline(0., linestyle=':', color='k', linewidth=.75, zorder=-20)

0 commit comments

Comments
 (0)