X Tutup
Skip to content

color_cycle deprecation warning could provide more context to user #7601

@alanbernstein

Description

@alanbernstein

It took me an unfortunately long time to figure out why I was getting this: "UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter."

This warning happens at import matplotlib.pyplot as plt, regardless of the remainder of the file. It comes from init.py:878, and can, presumably, be for a few different reasons. It turned out I had an old, no longer used, .mplstyle file with a prop_cycle definition. In tracking down the warning, I learned that matplotlib loads all .mplstyle files at import, whereas I assumed it loaded them upon usage. It would be helpful if the warning could somehow point to the style definition that generates it.

OSX 10.11.5
Python 2.7.12 (from brew install python)
matplotlib 1.5.3 (from pip install matplotlib)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup