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

DOC: Lowercase some parameter names#23995

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

Conversation

timhoffm
Copy link
Member

@timhoffmtimhoffm commentedSep 24, 2022
edited
Loading

Changes:

  • tricontour(x, y, Z, ...) -->trcontour(x, y, z, ...) (and same fortricontourf()
  • tripcolor(x, y, C, ...) -->tricpcolor(x, y, c, ...)

There is no reason here for uppercase C or Z, the preceding parameters x, y are also not uppercase.

Note that this is not an API change since these parameters are positional-only (created from *args). Thus, we can change the names without a deprecation.

@timhoffmtimhoffm added this to thev3.6.1 milestoneSep 24, 2022
Determines the orientation and exact position of *Z* by specifying the
position of ``Z[0, 0]``. This is only relevant, if *X*, *Y* are not given.
Determines the orientation and exact position of *z* by specifying the
position of ``z[0, 0]``. This is only relevant, if *X*, *Y* are not given.
Copy link
Member

Choose a reason for hiding this comment

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

What about*X* etc here and below? I cannot say that I fully follow, but it is talked aboutx earlier.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Interestingly,origin andextent are not used bytricontour[f] 😲. They are used incontour[f], where one can leave out X and Y, in which caseorigin andextent define where to place the data in the Axes. When one thinks about it, this concept does obviously does not apply to triangular grids. One always has to specify x and y, either directly or via a `Triangulation.

It's a bit hard to see thatorigin andextent are unused, because they are passed through multiple levels of kwargs and are added as attributes toContourSet, which is the common base class ofTriContourSet andQuadContourSet. ButTriContourSet does not use them. One can also check this by removing the validation checks on these values and then passing in nonsense values: The plot does not care. It seems this docstring part was copied fromcontour[f] without thinking about it.

Theorigin andextent parameters will need to be removed. But that's a bit more complicated because even though unused we need to deprecate, and we have to figure out whether we can move them toQuadContourSet. I therefore propose to ignore their docstrings in this PR. They will be cleaned up in a separate PR. For simplicity, we can merge as proposed - it really does not matter and does not make sense what is in there either way.

Copy link
Member

Choose a reason for hiding this comment

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

Good catch! What I meant though is that is seems like it should maybe be lower case x and y as well here?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yeah, my point was that this part of the docs doesn’t make sense either way and anyway will be removed soon. So it does not matter whether we change X and Y or not.

@timhoffm
Copy link
MemberAuthor

Rebased to fix CI.

There is no reason here for uppercase C or Z, the preceding parametersx, y are also not uppercase.Note that this is not an API change since these parameters arepositional-only (created from *args). Thus, we can change the nameswithout a deprecation.
@timhoffmtimhoffmforce-pushed thedoc-param-capitalization branch from5bec61c to4f04c56CompareOctober 16, 2022 21:12
@oscargusoscargus merged commit65c1b89 intomatplotlib:mainOct 19, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestOct 19, 2022
tacaswell added a commit that referenced this pull requestOct 19, 2022
…995-on-v3.6.xBackport PR#23995 on branch v3.6.x (DOC: Lowercase some parameter names)
@timhoffmtimhoffm deleted the doc-param-capitalization branchOctober 19, 2022 16:59
@ksundenksunden mentioned this pull requestFeb 20, 2023
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@oscargusoscargusoscargus approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6.2
Development

Successfully merging this pull request may close these issues.

3 participants
@timhoffm@oscargus@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp