8000 changed pylab calls to plt and np · domspad/matplotlib@dd51f48 · GitHub
[go: up one dir, main page]

Skip to content

Commit dd51f48

Browse files
author
domspad
committed
changed pylab calls to plt and np
1 parent b6b0514 commit dd51f48

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

examples/pylab_examples/arctest.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
#!/usr/bin/env python
2-
from pylab import *
3-
2+
import matplotlib.pyplot as plt
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*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)
0