Skip to content

Bug Fix: Normalize kwargs for Histogram #29552

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

Merged
merged 3 commits into from
Feb 14, 2025

Conversation

TheSkyentist
Copy link
Contributor

@TheSkyentist TheSkyentist commented Jan 30, 2025

PR summary

Closes #28884 by normalizing kwargs for hist. The behavior of shortened options, such as ls and ec, now behave as expected.

pyplot.hist([1,2,3,4,5],bins=5,histtype='step',ls=':')
pyplot.savefig('test.pdf')

now produces test.pdf

First brought to my attention by @ecrohr

PR checklist

  • new and changed code is tested

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@scottshambaugh
Copy link
Contributor

I believe this is the issue this would close? #28884

@TheSkyentist
Copy link
Contributor Author

Good catch! I made this draft while writing the issue. I’ll update the info.

@TheSkyentist TheSkyentist marked this pull request as ready for review January 31, 2025 09:21
@QuLogic
Copy link
Member

QuLogic commented Feb 11, 2025

Does this fully close #28884? It doesn't add plurals, and I think we didn't yet make a decision in #28884 on whether we even wanted to add plurals.

@timhoffm
Copy link
Member

You are right and that's ok. The issue itself is not decided whether we actually want plurals. This implements the obvious and uncontroversial part of the issue.

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
@QuLogic QuLogic added this to the v3.11.0 milestone Feb 14, 2025
@QuLogic QuLogic merged commit 067b77c into matplotlib:main Feb 14, 2025
41 checks passed
@QuLogic
Copy link
Member

QuLogic commented Feb 14, 2025

Thanks @TheSkyentist! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again.

@TheSkyentist TheSkyentist deleted the hist-kwargs branch February 14, 2025 13:04
prafulgulani pushed a commit to prafulgulani/matplotlib that referenced this pull request Feb 22, 2025
* Normalize kwargs for hist

* Avoid shadowing the builtin first!

Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
@timhoffm
Copy link
Member

@meeseeksdev backport to v3.10.x

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 26, 2025
@timhoffm timhoffm modified the milestones: v3.11.0, v3.10.2 Mar 26, 2025
QuLogic added a commit that referenced this pull request Mar 27, 2025
…552-on-v3.10.x

Backport PR #29552 on branch v3.10.x (Bug Fix: Normalize kwargs for Histogram)
@ksunden ksunden mentioned this pull request May 9, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ENH]: Expand hist() signature to support aliases and plural kwargs
4 participants