diff --git a/examples/pylab_examples/log_test.py b/examples/pylab_examples/log_test.py index fa9aca22becf..3641a1ac6460 100644 --- a/examples/pylab_examples/log_test.py +++ b/examples/pylab_examples/log_test.py @@ -10,10 +10,12 @@ import matplotlib.pyplot as plt import numpy as np +fig, ax = plt.subplots() + dt = 0.01 t = np.arange(dt, 20.0, dt) -plt.semilogx(t, np.exp(-t/5.0)) -plt.grid(True) +ax.semilogx(t, np.exp(-t / 5.0)) +ax.grid() plt.show()