Skip to content

Commit b1ebbdf

Browse files
author
Jed
committed
Removed matplotlib holds.
‘hold’ functionality deprecated The ‘hold’ keyword argument and all functions and methods related to it are deprecated, along with the ‘axes.hold’ rcParams entry. The behavior will remain consistent with the default hold=True state that has long been in place. Instead of using a function or keyword argument (hold=False) to change that behavior, explicitly clear the axes or figure as needed prior to subsequent plotting commands. http://matplotlib.org/api/api_changes.html#hold-functionality-deprecated
1 parent 8caf661 commit b1ebbdf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

control/freqplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def bode_plot(syslist, omega=None, dB=None, Hz=None, deg=None,
176176
pltline = ax_mag.semilogx(omega_plot, 20 * np.log10(mag), *args, **kwargs)
177177
else:
178178
pltline = ax_mag.loglog(omega_plot, mag, *args, **kwargs)
179-
plt.hold(True);
179+
180180
if nyquistfrq_plot:
181181
ax_mag.axvline(nyquistfrq_plot, color=pltline[0].get_color())
182182

@@ -191,7 +191,7 @@ def bode_plot(syslist, omega=None, dB=None, Hz=None, deg=None,
191191
else:
192192
phase_plot = phase
193193
ax_phase.semilogx(omega_plot, phase_plot, *args, **kwargs)
194-
ax_phase.hold(True);
194+
195195
if nyquistfrq_plot:
196196
ax_phase.axvline(nyquistfrq_plot, color=pltline[0].get_color())
197197

control/phaseplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def phase_plot(odefun, X=None, Y=None, scale=1, X0=None, T=None,
212212
for i in range(nr):
213213
state = odeint(odefun, X0[i], TSPAN, args=parms);
214214
time = TSPAN
215-
mpl.hold(True);
215+
216216
mpl.plot(state[:,0], state[:,1])
217217
#! TODO: add back in colors for stream lines
218218
# PP_stream_color(np.mod(i-1, len(PP_stream_color))+1));

0 commit comments

Comments
 (0)