Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
pep8ify examples/ part 3#3183
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
067c037
0c39c1a
54d4b58
469412f
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from __future__ import print_function | ||
import matplotlib.pyplot as plt | ||
def handle_close(evt): | ||
print('Closed Figure!') | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -10,19 +10,21 @@ | ||
fig, ax = plt.subplots() | ||
t = np.arange(0.0, 2.0, 0.01) | ||
y1 = np.sin(2 *np.pi *t) | ||
y2 = np.cos(2 *np.pi *t) | ||
line1, = ax.plot(y1) | ||
line2, = ax.plot(y2) | ||
N = 100 | ||
def on_idle(event): | ||
on_idle.count +=1 | ||
print('idle', on_idle.count) | ||
line1.set_ydata(np.sin(2 *np.pi * t * (N -on_idle.count) /float(N))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Excessive whitespace. | ||
event.canvas.draw() | ||
# test boolean return removal | ||
if on_idle.count ==N: | ||
return False | ||
return True | ||
on_idle.cid = None | ||
@@ -31,5 +33,3 @@ def on_idle(event): | ||
fig.canvas.mpl_connect('idle_event', on_idle) | ||
plt.show() | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -5,8 +5,8 @@ | ||
import matplotlib.pyplot as plt | ||
t = np.arange(0.0, 0.2, 0.1) | ||
y1 = 2 *np.sin(2 *np.pi *t) | ||
y2 = 4 *np.sin(2 *np.pi * 2 *t) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Excessive whitespace. | ||
fig, ax = plt.subplots() | ||
ax.set_title('Click on legend line to toggle line on/off') | ||
Uh oh!
There was an error while loading.Please reload this page.