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

Skip to content

Commit 26536ba

Browse files
committed
mep12 on arctest.py
1 parent 7539b61 commit 26536ba

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

examples/pylab_examples/arctest.py

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

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

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

1312

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

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

0 commit comments

Comments
 (0)