From d9954e08d0c9b9c1bc310ab723d5a220245565ae Mon Sep 17 00:00:00 2001 From: Stefan Pfenninger Date: Wed, 2 Dec 2015 15:51:58 +0100 Subject: [PATCH] Fix DeprecationWarning in stackplot.py --- lib/matplotlib/stackplot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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.