Fix DeprecationWarning in stackplot.py#5605
Conversation
|
👍 |
|
👍 seems reasonable enough to me. |
|
It seems that |
|
Holy crap! I didn't notice that this function modified the axes's cycle! This change should probably also reset the property cycle to its default prior to returning if it modified it originally. What I also don't like is that this uses the cycler in a bad way. Specifying the colors shouldn't do anything to the property cycle at all. Maybe the refactor of cycle handling will help here? |
|
@WeatherGod: I hear you on all this. I think for 1.5.x we can just do exactly this PR (to simply silence the warning). Anything else is probably best done on 2.0.x or later. |
|
Agreed. Sorry if I wasn't clear. v1.5 should duplicate the current behavior. |
|
Yeah, my aim was just to silence the warning, I didn't look at the bigger picture at all.. |
Fix DeprecationWarning in stackplot.py
Fix DeprecationWarning in stackplot.py
|
backported to v1.5.x as ba9ee86 |
|
@sjpfenninger Thank you and congratulations on (what I think is) your first mpl contribution! |
In matplotlib 1.5.0, plt.stackplot() raises a DeprecationWarning ("The set_color_cycle attribute was deprecated in version 1.5. Use set_prop_cycle instead"):
The simple replacement in the attached pull request seems to fix this.