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

Skip to content

mep12 on arctest.py #4820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 30, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
mep12 on arctest.py
  • Loading branch information
ericmjl committed Jul 29, 2015
commit 26536ba6bb6cd43f5ad95fda3c61b7f931fb498a
21 changes: 10 additions & 11 deletions examples/pylab_examples/arctest.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
#!/usr/bin/env python
from pylab import *

import matplotlib.pyplot as plt
import numpy as np

def f(t):
'a damped exponential'
s1 = cos(2*pi*t)
e1 = exp(-t)
return multiply(s1, e1)
s1 = np.cos(2*np.pi*t)
e1 = np.exp(-t)
return np.multiply(s1, e1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh, don't know why multiply was ever used here. Let's just replace that with s1 * e1.


t1 = arange(0.0, 5.0, .2)
t1 = np.arange(0.0, 5.0, .2)


l = plot(t1, f(t1), 'ro')
setp(l, 'markersize', 30)
setp(l, 'markerfacecolor', 'b')
l = plt.plot(t1, f(t1), 'ro')
plt.setp(l, 'markersize', 30)
plt.setp(l, 'markerfacecolor', 'b')

show()
plt.show()