Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6229131

Browse files
committed
Merge pull request #4820 from ericmjl/mep12_arctest.py
mep12 on arctest.py
2 parents 12efb7f + 626655a commit 6229131

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

examples/pylab_examples/arctest.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
#!/usr/bin/env python
2-
from pylab import *
1+
import matplotlib.pyplot as plt
2+
import numpy as np
33

44

55
def f(t):
66
'a damped exponential'
7-
s1 = cos(2*pi*t)
8-
e1 = exp(-t)
9-
return multiply(s1, e1)
7+
s1 = np.cos(2 * np.pi * t)
8+
e1 = np.exp(-t)
9+
return s1 * e1
1010

11-
t1 = arange(0.0, 5.0, .2)
11+
t1 = np.arange(0.0, 5.0, .2)
1212

1313

14-
l = plot(t1, f(t1), 'ro')
15-
setp(l, 'markersize', 30)
16-
setp(l, 'markerfacecolor', 'b')
14+
l = plt.plot(t1, f(t1), 'ro')
15+
plt.setp(l, 'markersize', 30)
16+
plt.setp(l, 'markerfacecolor', 'b')
1717

18-
show()
18+
plt.show()

0 commit comments

Comments
 (0)