8000 ENH : add to_list method · danielballan/matplotlib@e6910e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit e6910e4

Browse files
committed
ENH : add to_list method
Return a list of the style dictionaries yielded by this Cycler
1 parent 74e61e1 commit e6910e4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/matplotlib/cycler.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ def finite_iter(self):
6969
return iter(self._left)
7070
return self._compose()
7171

72+
def to_list(self):
73+
"""
74+
Return a list of the dictionaries yielded by
75+
this Cycler.
76+
77+
Returns
78+
-------
79+
cycle : list
80+
All of the dictionaries yielded by this Cycler in order.
81+
"""
82+
return list(self.finite_iter())
83+
7284
def _compose(self):
7385
"""
7486
Compose the 'left' and 'right' components of this cycle

0 commit comments

Comments
 (0)
0