Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 12efb7f + 626655a commit 6229131Copy full SHA for 6229131
examples/pylab_examples/arctest.py
@@ -1,18 +1,18 @@
1
-#!/usr/bin/env python
2
-from pylab import *
+import matplotlib.pyplot as plt
+import numpy as np
3
4
5
def f(t):
6
'a damped exponential'
7
- s1 = cos(2*pi*t)
8
- e1 = exp(-t)
9
- return multiply(s1, e1)
+ s1 = np.cos(2 * np.pi * t)
+ e1 = np.exp(-t)
+ return s1 * e1
10
11
-t1 = arange(0.0, 5.0, .2)
+t1 = np.arange(0.0, 5.0, .2)
12
13
14
-l = plot(t1, f(t1), 'ro')
15
-setp(l, 'markersize', 30)
16
-setp(l, 'markerfacecolor', 'b')
+l = plt.plot(t1, f(t1), 'ro')
+plt.setp(l, 'markersize', 30)
+plt.setp(l, 'markerfacecolor', 'b')
17
18
-show()
+plt.show()
0 commit comments