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] Clarify some tick-related docstrings#26619

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-ticks-visible
Aug 30, 2023

Conversation

timhoffm
Copy link
Member

Inspired by#26612.

Copy link
Member

@story645story645 left a comment

Choose a reason for hiding this comment

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

Um bunch of comments trying to make things more explicit while also balancing conciseness. I also think a good follow up could be an example showing what all these mean. kinda likehttps://matplotlib.org/devdocs/gallery/subplots_axes_and_figures/axis_equal_demo.html

Comment on lines 3434 to 3435
This affects the tick components (tick markers, tick labels, grid lines), the
axis lines (spines) and the axis labels.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Thisaffectsthetickcomponents (tickmarkers,ticklabels,gridlines),the
axislines (spines)andtheaxislabels.
Thisremovestheaxislabels,axisspines,andtheaxistickcomponents,whicharethetickmarkers,ticklabels,andgridlines.

removing parenthesis and I think spine is fine in context

Comment on lines +2045 to +2044
'square' Square plot; similar to 'scaled', but initially forcing
``xmax-xmin == ymax-ymin``.
Copy link
Member

Choose a reason for hiding this comment

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

should this maybe be moved under scaled then?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

As above: scaling is not in the scope of the PR

Additionally, further autoscaling will be disabled.
'tight' Set limits just large enough to show all data, then
disable further autoscaling.
'auto' Automatic scaling (fill plot box with data).
Copy link
Member

Choose a reason for hiding this comment

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

what does fill plot box (Axes?) with data mean?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

As above: scaling is not in the scope of the PR

@story645story645 added the Documentation: APIfiles in lib/ and doc/api labelAug 29, 2023
@timhoffmtimhoffmforce-pushed thedoc-ticks-visible branch 2 times, most recently from4bba6cc to7296cf2CompareAugust 29, 2023 22:14
Copy link
MemberAuthor

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

I've rewritten the docstrings forset_axis_on/off with the focus on making it clear thatset_axis_off() is a global switch to hide all decorations (I intentionally use "hide" and not "remove" because the latter has a notion of delete.)

@@ -2090,7 +2090,7 @@ def _set_tick_locations(self, ticks, *, minor=False):

def set_ticks(self, ticks, labels=None, *, minor=False, **kwargs):
"""
Set this Axis' tick locations and optionally labels.
Set this Axis' tick locations and optionallyticklabels.
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The function is thenAxes.set_yticks. While "y" is in the function name, it's nice to mention the axis in the docstring explicitly, because Axes has more than one axis.

story645 reacted with thumbs up emoji
Comment on lines 2025 to 2027
'on' or `True` Do not hide all axis decorations, i.e. axis labels, spines,
tick marks, tick labels, and grid lines.
This is the same as `~.Axes.set_axis_on()`.
'off' or `False` Hide all axis decorations, i.e. axis labels, spines,
tick marks, tick labels, and grid lines.
This is the same as `~.Axes.set_axis_off()`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'on'or`True`Donothideallaxisdecorations,i.e.axislabels,spines,
tickmarks,ticklabels,andgridlines.
Thisisthesameas`~.Axes.set_axis_on()`.
'off'or`False`Hideallaxisdecorations,i.e.axislabels,spines,
tickmarks,ticklabels,andgridlines.
Thisisthesameas`~.Axes.set_axis_off()`.
'off'or`False`Hideallaxisdecorations,i.e.axislabels,spines,
tickmarks,ticklabels,andgridlines.
Thisisthesameas`~.Axes.set_axis_off()`.
'on'or`True`Donothideaxisdecorations,i.e.axislabels,spines,
tickmarks,ticklabels,andgridlines.
Thisisthesameas`~.Axes.set_axis_on()`.

partly b/c off is more commonly used, partly b/c 'do not hide all' is doing something strange where it can still mean 'hide some' -which is true but not what the sentence is trying to say, so it's maybe clearer if set up as a contrast to 'off'


This affects the axis lines, ticks, ticklabels, grid and axis labels.
This is an Axes-wide setting to suppress drawing of all axis decorations, i.e.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ThisisanAxes-widesettingtosuppressdrawingofallaxisdecorations,i.e.
Thissettingsuppressesdrawingofallaxisdecorations,i.e.

per convo w/@QuLogic, I don't think the termAxes-wide adds anything so I'd rather we not create a new term.

Apply suggestions from code reviewCo-authored-by: hannah <story645@gmail.com>
@oscargusoscargus modified the milestones:v3.8-doc,v3.8.0Aug 30, 2023
@oscargusoscargus merged commit0b50f1e intomatplotlib:mainAug 30, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestAug 30, 2023
@timhoffmtimhoffm deleted the doc-ticks-visible branchAugust 30, 2023 06:49
timhoffm added a commit that referenced this pull requestAug 30, 2023
…619-on-v3.8.xBackport PR#26619 on branch v3.8.x ([DOC] Clarify some tick-related docstrings)
@ksundenksunden mentioned this pull requestSep 15, 2023
5 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic left review comments

@story645story645story645 approved these changes

@oscargusoscargusoscargus approved these changes

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

Successfully merging this pull request may close these issues.

4 participants
@timhoffm@QuLogic@story645@oscargus

[8]ページ先頭

©2009-2025 Movatter.jp