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 ba9ee86

Browse filesBrowse files
committed
Merge pull request #5605 from sjpfenninger/stackplot-cycler
Fix DeprecationWarning in stackplot.py
1 parent 34c7dad commit ba9ee86
Copy full SHA for ba9ee86

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-1
lines changed

‎lib/matplotlib/stackplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/stackplot.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from matplotlib.externals import six
1313
from matplotlib.externals.six.moves import xrange
1414

15+
from cycler import cycler
1516
import numpy as np
1617

1718
__all__ = ['stackplot']
@@ -63,7 +64,7 @@ def stackplot(axes, x, *args, **kwargs):
6364

6465
colors = kwargs.pop('colors', None)
6566
if colors is not None:
66-
axes.set_color_cycle(colors)
67+
axes.set_prop_cycle(cycler('color', colors))
6768

6869
baseline = kwargs.pop('baseline', 'zero')
6970
# Assume data passed has not been 'stacked', so stack it here.

0 commit comments

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