Skip to content

Non-default color_cycle not working in Pie plot #4975

Closed

Description

@rubennj

Changing the default color_cycle works in other charts but not in pie.

import matplotlib as mpl
import matplotlib.pylab as plt

mpl.rcParams['axes.color_cycle'] = ['c', 'm', 'y', 'k']

fig, ax = plt.subplots()

ax.pie([15, 30, 45, 10])

New colors can be used only changing the colors parameter of pie.

Versions: MPL 1.4.3 - Python 3.4.1 - Windows

Activity

  1. WeatherGod commented on Aug 21, 2015

    @WeatherGod
    Member

    Yes, the "color cycle" in the pie() function was a quick-n-dirty kludge,
    IIRC. The function hard-codes the cycle and doesn't use the internal cycle.
    It shouldn't be too difficult to get it hooked up to the new property
    cycling feature I am working on right now.

    On Fri, Aug 21, 2015 at 6:15 AM, Ruben Nuñez notifications@github.com
    wrote:

    Changing the default color_cycle works in other charts but not in pie.

    import matplotlib as mpl
    import matplotlib.pylab as plt

    mpl.rcParams['axes.color_cycle'] = ['c', 'm', 'y', 'k']

    fig, ax = plt.subplots()

    ax.pie([15, 30, 45, 10])

    New colors can be used only changing the colors parameter of pie.

    Versions: MPL 1.4.3 - Python 3.4.1 - Windows

    —
    Reply to this email directly or view it on GitHub
    #4975.

  2. added this to the milestone on Aug 21, 2015
  3. languitar commented on Nov 23, 2015

    @languitar
    Contributor

    👍

  4. modified the milestones: , on Nov 23, 2015
  5. mdboom commented on Nov 23, 2015

    @mdboom
    Member

    I'm remilestoning this as 2.0. Since we're changing the default color cycle for 2.0, we should definitely fix the hard-coded one in pie.

  6. mdboom commented on Jan 25, 2016

    @mdboom
    Member

    This is fixed by #5674.

  7. tacaswell commented on Apr 28, 2016

    @tacaswell
    Member

    closed by #6291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions