Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 26536ba

Browse filesBrowse files
committed
mep12 on arctest.py
1 parent 7539b61 commit 26536ba
Copy full SHA for 26536ba

File tree

Expand file treeCollapse file tree

1 file changed

+10
-11
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-11
lines changed

‎examples/pylab_examples/arctest.py

Copy file name to clipboard
+10-11Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.