diff --git a/lib/matplotlib/stackplot.py b/lib/matplotlib/stackplot.py index 0a8c10d36a40..4f48d0b85b9a 100644 --- a/lib/matplotlib/stackplot.py +++ b/lib/matplotlib/stackplot.py @@ -12,6 +12,7 @@ from matplotlib.externals import six from matplotlib.externals.six.moves import xrange +from cycler import cycler import numpy as np __all__ = ['stackplot'] @@ -63,7 +64,7 @@ def stackplot(axes, x, *args, **kwargs): colors = kwargs.pop('colors', None) if colors is not None: - axes.set_color_cycle(colors) + axes.set_prop_cycle(cycler('color', colors)) baseline = kwargs.pop('baseline', 'zero') # Assume data passed has not been 'stacked', so stack it here.