Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve error message for boxplot_stats function, by printing dimensions. - #32305

Merged
iccir merged 1 commit into
matplotlib:mainfrom
carlosgmartin:boxplot_stats_improve_error_message
Sep 7, 2026
Merged

Improve error message for boxplot_stats function, by printing dimensions.#32305
iccir merged 1 commit into
matplotlib:mainfrom
carlosgmartin:boxplot_stats_improve_error_message

Conversation

@carlosgmartin

Copy link
Copy Markdown
Contributor

PR summary

This edits the error message raised by boxplot_stats for incompatible dimensions to print those dimensions. This is useful for debugging. Related issue: #32304.

AI Disclosure

No AI used.

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested
  • [N/A] Plotting related features are demonstrated in an example
  • [N/A] New features and API changes have release notes
  • [N/A] Documentation complies with general and docstring guidelines

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

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. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process.

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

For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.

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

@carlosgmartin
carlosgmartin force-pushed the boxplot_stats_improve_error_message branch from a0fae4d to dc75afb Compare September 5, 2026 18:29
@iccir

iccir commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Note that you need to use "Closes #X" explicitly in the PR in order to link the corresponding issue. See Linking a pull request to an issue using a keyword.

@iccir iccir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. I'll let the second reviewer decide if any of the formatting should be changed.

@carlosgmartin

Copy link
Copy Markdown
Contributor Author

@iccir This doesn't close the linked issue.

@jklymak jklymak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I rephrase this lot directly if we are making a change. "The number of labels ({len(labels)}) must match the number of columns {ncols}." "Compatible with" is vague in this case where there isn't more than one way they are compatible.

@carlosgmartin
carlosgmartin force-pushed the boxplot_stats_improve_error_message branch from dc75afb to 0f2ebb6 Compare September 5, 2026 20:56
@carlosgmartin

Copy link
Copy Markdown
Contributor Author

@jklymak Updated.

@iccir
iccir merged commit 2153774 into matplotlib:main Sep 7, 2026
41 checks passed
@carlosgmartin
carlosgmartin deleted the boxplot_stats_improve_error_message branch September 7, 2026 02:19
@QuLogic QuLogic added this to the v3.11.2 milestone Sep 8, 2026
@QuLogic

QuLogic commented Sep 8, 2026

Copy link
Copy Markdown
Member

@meeseeksdev backport to v3.11.x

QuLogic pushed a commit that referenced this pull request Sep 8, 2026
QuLogic added a commit that referenced this pull request Sep 8, 2026
…305-on-v3.11.x

Backport PR #32305 on branch v3.11.x (Improve error message for boxplot_stats function, by printing dimensions.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants