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 9c61a9d

Browse filesBrowse files
committed
MNT: remove unreachable code
The validation on the rcParams means that `rcParams['axes.prop_cycle']` can never be None.
1 parent 14664e2 commit 9c61a9d
Copy full SHA for 9c61a9d

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+0
-7
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,6 @@ def __setstate__(self, state):
164164
def set_prop_cycle(self, *args, **kwargs):
165165
if not (args or kwargs) or (len(args) == 1 and args[0] is None):
166166
prop_cycler = rcParams['axes.prop_cycle']
167-
if prop_cycler is None and 'axes.color_cycle' in rcParams:
168-
clist = rcParams['axes.color_cycle']
169-
prop_cycler = cycler('color', clist)
170167
else:
171168
prop_cycler = cycler(*args, **kwargs)
172169

‎lib/matplotlib/colors.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colors.py
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,7 @@ def to_rgba(c, alpha=None):
126126
# Special-case nth color syntax because it should not be cached.
127127
if _is_nth_color(c):
128128
from matplotlib import rcParams
129-
from matplotlib.rcsetup import cycler
130129
prop_cycler = rcParams['axes.prop_cycle']
131-
if prop_cycler is None and 'axes.color_cycle' in rcParams:
132-
clist = rcParams['axes.color_cycle']
133-
prop_cycler = cycler('color', clist)
134130
colors = prop_cycler._transpose().get('color', 'k')
135131
c = colors[int(c[1]) % len(colors)]
136132
try:

0 commit comments

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