Skip to content

Commit c67da3a

Browse files
committed
move code around in grid.py
1 parent 234e6ec commit c67da3a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

control/grid.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,6 @@ def sgrid(scaling=None):
141141
return ax, fig
142142

143143

144-
# Utility function used by all grid code
145-
def _final_setup(ax, scaling=None):
146-
ax.set_xlabel('Real')
147-
ax.set_ylabel('Imaginary')
148-
ax.axhline(y=0, color='black', lw=0.25)
149-
ax.axvline(x=0, color='black', lw=0.25)
150-
151-
# Set up the scaling for the axes
152-
scaling = 'equal' if scaling is None else scaling
153-
plt.axis(scaling)
154-
155-
156144
# If not grid is given, at least separate stable/unstable regions
157145
def nogrid(dt=None, ax=None, scaling=None):
158146
fig = plt.gcf()
@@ -226,3 +214,15 @@ def zgrid(zetas=None, wns=None, ax=None, scaling=None):
226214

227215
_final_setup(ax, scaling=scaling)
228216
return ax, fig
217+
218+
219+
# Utility function used by all grid code
220+
def _final_setup(ax, scaling=None):
221+
ax.set_xlabel('Real')
222+
ax.set_ylabel('Imaginary')
223+
ax.axhline(y=0, color='black', lw=0.25)
224+
ax.axvline(x=0, color='black', lw=0.25)
225+
226+
# Set up the scaling for the axes
227+
scaling = 'equal' if scaling is None else scaling
228+
plt.axis(scaling)

0 commit comments

Comments
 (0)