Skip to content

Document Axes.spines #29965

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 1 commit into from
Apr 25, 2025
Merged

Document Axes.spines #29965

merged 1 commit into from
Apr 25, 2025

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented Apr 25, 2025

PR summary

Closes #29964, by hanging a docstring from a class level type hint. I did not know you could do this - so thanks to @timhoffm for the pointer.

PR checklist

@rcomer rcomer added topic: axes Documentation: API files in lib/ and doc/api labels Apr 25, 2025
@rcomer
Copy link
Member Author

rcomer commented Apr 25, 2025

Renders like this

@rcomer rcomer added this to the v3.10.2 milestone Apr 25, 2025
Comment on lines +563 to +564
The `.Spines` container for the Axes' spines, i.e. the lines denoting the
data area boundaries.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe:

Suggested change
The `.Spines` container for the Axes' spines, i.e. the lines denoting the
data area boundaries.
The `.Spines` container for the Axes' spines, usually the lines that denote the x- and y-axis.

because the spines need not be on the data area boundaries (of course they need not be x or y axises either, but "usually" should be fine for that)?

Copy link
Member

Choose a reason for hiding this comment

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

I slightly lean towards the present description. While not general, it's what the default is, and thus it's easier to understand. Possibly a more detailed description should go into the class docs?

Copy link
Member Author

@rcomer rcomer Apr 25, 2025

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough because some of the spines do not have axis info on them. I still found it an odd construction.

@jklymak jklymak merged commit 4af11e7 into matplotlib:main Apr 25, 2025
45 of 47 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Apr 25, 2025
QuLogic added a commit that referenced this pull request Apr 26, 2025
…965-on-v3.10.x

Backport PR #29965 on branch v3.10.x (Document Axes.spines)
@rcomer rcomer deleted the doc-axes-spines branch April 26, 2025 09:40
@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
Documentation: API files in lib/ and doc/api topic: axes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Doc]: object description for "spines"of matplot.axes.Axes not found
3 participants