Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rename boxplot's tick label parameter#27901

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
rcomer merged 7 commits intomatplotlib:mainfromsaranti:rename_tick
Mar 13, 2024

Conversation

saranti
Copy link
Contributor

@sarantisaranti commentedMar 10, 2024
edited
Loading

PR summary

Change the parameter namelabels totick_labels and deprecate the former name.

eg.
ax.boxplot(data, tick_labels=...)

Also update all the galley examples that used the parameter.

PR checklist

Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

The exampls need to be updated to the new parameter name (see the GiHub Actions deprecation warnings in the "Files Changed" tab).

@github-actionsgithub-actionsbot added Documentation: examplesfiles in galleries/examples and removed topic: ticks axis labels Documentation: APIfiles in lib/ and doc/api labelsMar 11, 2024
@rcomer
Copy link
Member

There are also a couple of existing tests that are failing because they use thelabels parameter (and warnings gets promoted to errors within our tests).

@saranti
Copy link
ContributorAuthor

There are also a couple of existing tests that are failing because they use thelabels parameter (and warnings gets promoted to errors within our tests).

Should I change those over on this PR?

timhoffm reacted with thumbs up emoji

@rcomer
Copy link
Member

Should I change those over on this PR?

Yes, the existing tests should use the new name I think.

timhoffm reacted with thumbs up emoji

Copy link
Member

@rcomerrcomer left a comment

Choose a reason for hiding this comment

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

A couple of questions which I’m not 100% sure about myself:

  • Should the key in the dictionaries that come out ofcbook.bxpstats also be renamed?
  • Should the test be moved to a different file since it doesn’t check anything aboutlegend any more?

@timhoffm
Copy link
Member

timhoffm commentedMar 12, 2024
edited
Loading

A couple of questions which I’m not 100% sure about myself:

  • Should the key in the dictionaries that come out ofcbook.bxpstats also be renamed?

I would leave that for now as the migration path is hard in terms of compatibility. We should do something like
#27788 for the return type ofbxp. A migration becomes much easier with that. But that's for a separate/follow-up PR.

  • Should the test be moved to a different file since it doesn’t check anything aboutlegend any more?

Yes, please move totest_axes.py.

rcomer reacted with thumbs up emoji

Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

This is good to go. Therefore, tagging as 3.9.

saranti reacted with thumbs up emoji
@timhoffmtimhoffm added this to thev3.9.0 milestoneMar 13, 2024
@rcomerrcomer merged commit4f56e1f intomatplotlib:mainMar 13, 2024
@sarantisaranti deleted the rename_tick branchMarch 13, 2024 14:57
timhoffm added a commit to timhoffm/matplotlib that referenced this pull requestMar 13, 2024
This is up for debate: I'm only +0.2 here.The renaming was done inmatplotlib#27901, which renamed the parameter `labels`to `tick_labels` for `boxplot()` and `bxp()`.One can take two views here:- If `boxplot_stats()` is specifically for the input of `bxp()`, one  can justify the renaming as being consistent with the `bxp()`  signature. Note however, that the returned dict still  contains the key "label" for back-compatibility. So that brings us  an inconsistency between the parameter name and the returned dict key.- One can alternatively view `boxplot_stats()` as a generic function to  define box parameters. Here, we'd only have a general `label` for  the boy and no information that this should be used as tick  label.If we could make a clean transition and also rename the dict key, Iwould tend to go with the first view. But the inevitable inconsistencyof the fist view let's me sway towards the second view, so that withthe revert, we've effectively not touched `boxplot_stats()`.
timhoffm added a commit to timhoffm/matplotlib that referenced this pull requestMar 13, 2024
This is up for debate: I'm only +0.2 here.The renaming was done inmatplotlib#27901, which renamed the parameter `labels`to `tick_labels` for `boxplot()` and `bxp()`.One can take two views here:- If `boxplot_stats()` is specifically for the input of `bxp()`, one  can justify the renaming as being consistent with the `bxp()`  signature. Note however, that the returned dict still  contains the key "label" for back-compatibility. So that brings us  an inconsistency between the parameter name and the returned dict key.- One can alternatively view `boxplot_stats()` as a generic function to  define box parameters. Here, we'd only have a general `label` for  the boy and no information that this should be used as tick  label.If we could make a clean transition and also rename the dict key, Iwould tend to go with the first view. But the inevitable inconsistencyof the fist view let's me sway towards the second view, so that withthe revert, we've effectively not touched `boxplot_stats()`.
timhoffm added a commit to timhoffm/matplotlib that referenced this pull requestMar 14, 2024
This is up for debate: I'm only +0.2 here.The renaming was done inmatplotlib#27901, which renamed the parameter `labels`to `tick_labels` for `boxplot()` and `bxp()`.One can take two views here:- If `boxplot_stats()` is specifically for the input of `bxp()`, one  can justify the renaming as being consistent with the `bxp()`  signature. Note however, that the returned dict still  contains the key "label" for back-compatibility. So that brings us  an inconsistency between the parameter name and the returned dict key.- One can alternatively view `boxplot_stats()` as a generic function to  define box parameters. Here, we'd only have a general `label` for  the boy and no information that this should be used as tick  label.If we could make a clean transition and also rename the dict key, Iwould tend to go with the first view. But the inevitable inconsistencyof the fist view let's me sway towards the second view, so that withthe revert, we've effectively not touched `boxplot_stats()`.
timhoffm added a commit to timhoffm/matplotlib that referenced this pull requestMar 15, 2024
This is up for debate: I'm only +0.2 here.The renaming was done inmatplotlib#27901, which renamed the parameter `labels`to `tick_labels` for `boxplot()` and `bxp()`.One can take two views here:- If `boxplot_stats()` is specifically for the input of `bxp()`, one  can justify the renaming as being consistent with the `bxp()`  signature. Note however, that the returned dict still  contains the key "label" for back-compatibility. So that brings us  an inconsistency between the parameter name and the returned dict key.- One can alternatively view `boxplot_stats()` as a generic function to  define box parameters. Here, we'd only have a general `label` for  the boy and no information that this should be used as tick  label.If we could make a clean transition and also rename the dict key, Iwould tend to go with the first view. But the inevitable inconsistencyof the fist view let's me sway towards the second view, so that withthe revert, we've effectively not touched `boxplot_stats()`.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

@rcomerrcomerrcomer approved these changes

Assignees
No one assigned
Labels
Documentation: examplesfiles in galleries/examplestopic: pyplot API
Projects
None yet
Milestone
v3.9.0
Development

Successfully merging this pull request may close these issues.

3 participants
@saranti@rcomer@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp