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 701bfb0

Browse filesBrowse files
committed
MNT: remove implicit color from cycler axes._base
1 parent ef4aed5 commit 701bfb0
Copy full SHA for 701bfb0

File tree

Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,6 @@ def set_prop_cycle(self, *args, **kwargs):
167167
else:
168168
prop_cycler = cycler(*args, **kwargs)
169169

170-
# Make sure the cycler always has at least one color
171-
if 'color' not in prop_cycler.keys:
172-
prop_cycler = prop_cycler * cycler('color', ['k'])
173-
174170
self.prop_cycler = itertools.cycle(prop_cycler)
175171
# This should make a copy
176172
self._prop_keys = prop_cycler.keys
@@ -200,6 +196,8 @@ def get_next_color(self):
200196
"""
201197
Return the next color in the cycle.
202198
"""
199+
if 'color' not in self._prop_keys:
200+
return 'k'
203201
return six.next(self.prop_cycler)['color']
204202

205203
def set_lineprops(self, line, **kwargs):

0 commit comments

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