Skip to content

[MNT]: More consistent color parameters for bar() #29090

Closed

Description

@timhoffm

Summary

From #29072. bar() supports

  • color : color or list of color
  • edgecolor : color or list of color
  • facecolor: color

i.e.

Proposed fix

Make facecolor accept sequences and check that the parameter precedence among color, edgecolor and facecolor is reasonable and comparable with scatter, which can take an explicit color via c (equivalent to color here).

For now, I'd refrain from introducing plural aliase. bar() is originally and primarily a style-all-bars-identical function. Per-bar styling was added later on, and I don't think there's a strong need to support this additional use case with an added plural alias.

Activity

  1. vsanthapur commented on Nov 7, 2024

    @vsanthapur

    Hi Matplotlib team! My partner and I would like to work on this issue as part of a project for our software engineering class. We're looking forward to contributing by improving the consistency of the bar() function’s color parameters. Any guidance or pointers on starting would be greatly appreciated!

    Thanks very much!

  2. added this to the v3.10.0 milestone on Nov 30, 2024
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