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] Slightly improve the LineCollection docstring#26676

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
oscargus merged 1 commit intomatplotlib:mainfromtimhoffm:doc-linecollection
Sep 12, 2023

Conversation

timhoffm
Copy link
Member

@timhoffmtimhoffm commentedSep 1, 2023
edited
Loading

PR summary

Closes#26674. There's two aspects to the issue:

  • theLineCollection description is slightly unclear. - This is fixed here.

  • Line3DCollection inherits__init__ and reuses its docstring. That's problematic because the the description is 2D. I don't see a good solution here. We likely don't want to replicate the whole docstring, and also a comment like "This holds analogously for 3D with points (x0, y0, z0) and Mx3 arrays." is awkward both for the 2D and 3D docstrings.

    I therefore propose to leave it at this. If the 2D description is clear, the extension to 3D can be inferred by the user. - Not ideal, but the least bad option IMHO.

@timhoffmtimhoffm added the Documentation: APIfiles in lib/ and doc/api labelSep 1, 2023

or the equivalent numpy array with two columns. Each line
or the equivalentMx2numpy array with two columns. Each line
Copy link
Contributor

@anntzeranntzerSep 1, 2023
edited
Loading

Choose a reason for hiding this comment

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

(M, 2)

I would perhaps completely drop the "list of points" and just write

A sequence ``[line0, line1, ...]`` where each line is a (N, 2)-shapearray-like of points::    line0 = [(x0, y0), (x1, y1), ...]Each line can...

story645 reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I don't really care. This is a very quick PR to improve a misunderstanding in#26676. I have no time to bike shed this further. Feel free to push to this PR or take over if you think it's possible/worth improving further.

@jklymak
Copy link
Member

If the 2D description is clear, the extension to 3D can be inferred by the user. - Not ideal, but the least bad option IMHO.

We can always write a 3D docstring, can't we?

@timhoffm
Copy link
MemberAuthor

If the 2D description is clear, the extension to 3D can be inferred by the user. - Not ideal, but the least bad option IMHO.

We can always write a 3D docstring, can't we?

Yes. And thinking again, maybe that'd be the sane thing to do, even though that means writing an empty__init__.

Anybody, this PR is just a quick fix for a misleading wording in LineCollection. I'm not going to bike shed this furher or add the 3D docstring. IMHO this can go in as-is as an improvement. Please take over for further improvements.

@oscargusoscargus added this to thev3.8.0 milestoneSep 12, 2023
@oscargusoscargus merged commit48e9ec7 intomatplotlib:mainSep 12, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestSep 12, 2023
oscargus added a commit that referenced this pull requestSep 12, 2023
…676-on-v3.8.xBackport PR#26676 on branch v3.8.x ([DOC] Slightly improve the LineCollection docstring)
@timhoffmtimhoffm deleted the doc-linecollection branchSeptember 14, 2023 10:21
@ksundenksunden mentioned this pull requestSep 15, 2023
5 tasks
timhoffm added a commit to timhoffm/matplotlib that referenced this pull requestDec 9, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer left review comments

@scottshambaughscottshambaughscottshambaugh approved these changes

Assignees
No one assigned
Labels
Documentation: APIfiles in lib/ and doc/api
Projects
None yet
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

[Doc]: Line3DCollection segments
5 participants
@timhoffm@jklymak@anntzer@scottshambaugh@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp