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 49111fe

Browse filesBrowse files
authored
Merge pull request #23783 from meeseeksmachine/auto-backport-of-pr-23782-on-v3.6.x
Backport PR #23782 on branch v3.6.x (Remove `Axes.cla` from examples)
2 parents 69644dc + d7f8404 commit 49111fe
Copy full SHA for 49111fe

File tree

Expand file treeCollapse file tree

2 files changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-5
lines changed

‎examples/animation/animation_demo.py

Copy file name to clipboardExpand all lines: examples/animation/animation_demo.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
fig, ax = plt.subplots()
2222

23-
for i in range(len(data)):
24-
ax.cla()
25-
ax.imshow(data[i])
26-
ax.set_title("frame {}".format(i))
23+
for i, img in enumerate(data):
24+
ax.clear()
25+
ax.imshow(img)
26+
ax.set_title(f"frame {i}")
2727
# Note that using time.sleep does *not* work here!
2828
plt.pause(0.1)

‎examples/event_handling/data_browser.py

Copy file name to clipboardExpand all lines: examples/event_handling/data_browser.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def update(self):
7575

7676
dataind = self.lastind
7777

78-
ax2.cla()
78+
ax2.clear()
7979
ax2.plot(X[dataind])
8080

8181
ax2.text(0.05, 0.9, f'mu={xs[dataind]:1.3f}\nsigma={ys[dataind]:1.3f}',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.