Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
timhoffm opened this issue Nov 5, 2024 · 1 comment · Fixed by #29133
Closed

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

timhoffm opened this issue Nov 5, 2024 · 1 comment · Fixed by #29133
Milestone

Comments

@timhoffm
Copy link
Member

timhoffm commented Nov 5, 2024

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.

@vsanthapur
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants