diff --git a/examples/pylab_examples/arctest.py b/examples/pylab_examples/arctest.py index b915f0075c93..35c12bee407d 100644 --- a/examples/pylab_examples/arctest.py +++ b/examples/pylab_examples/arctest.py @@ -1,18 +1,18 @@ -#!/usr/bin/env python -from pylab import * +import matplotlib.pyplot as plt +import numpy as np def f(t): 'a damped exponential' - s1 = cos(2*pi*t) - e1 = exp(-t) - return multiply(s1, e1) + s1 = np.cos(2 * np.pi * t) + e1 = np.exp(-t) + return s1 * e1 -t1 = arange(0.0, 5.0, .2) +t1 = np.arange(0.0, 5.0, .2) -l = plot(t1, f(t1), 'ro') -setp(l, 'markersize', 30) -setp(l, 'markerfacecolor', 'b') +l = plt.plot(t1, f(t1), 'ro') +plt.setp(l, 'markersize', 30) +plt.setp(l, 'markerfacecolor', 'b') -show() +plt.show()