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 8955aad

Browse filesBrowse files
committed
Add __iter__ implementation to ArtistList.
1 parent c2a2649 commit 8955aad
Copy full SHA for 8955aad

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+5
-0
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,11 @@ def __len__(self):
12251225
return sum(self._type_check(artist)
12261226
for artist in self._axes._children)
12271227

1228+
def __iter__(self):
1229+
for artist in self._axes._children:
1230+
if self._type_check(artist):
1231+
yield artist
1232+
12281233
def __getitem__(self, key):
12291234
return [artist
12301235
for artist in self._axes._children

0 commit comments

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