Skip to content

Use Axes instead of axes in the docs. #18726

Closed as not planned
Closed as not planned

Description

@timhoffm

Problem

From #18707 (comment):

Using lower-case "axes" in docstrings such as

Return whether any artists have been added to the axes.

is slightly ambiguous due to Axes being a special concept in Matplotlib not matching the plain english meaning.

Suggested Improvement

Always use "Axes" when referring to an Axes but not wanting to link to the class, .i.e.

Return whether any artists have been added to the Axes.

Note: This is a different compared to "figure".

Cases that should not become uppercase, include in particular

  • "axes" as a simple plural of axis
  • compound words like "axes space", "axes coordinates"

Activity

  1. jhalak27 commented on Oct 21, 2020

    @jhalak27

    Hey, I am new here. Is this issue still open?

  2. timhoffm commented on Oct 21, 2020

    @timhoffm
    MemberAuthor

    Yes it is. You are welcome to pick it up if you like.

  3. jhalak27 commented on Oct 21, 2020

    @jhalak27

    Could you let me know which axes should I change? Bit confused.

  4. timhoffm commented on Oct 21, 2020

    @timhoffm
    MemberAuthor

    There's an ambiguity:

    • "axes" as plural of axis; e.g. the docstring of get_autoscale_on()
    • "axes" referring to an instance of the class Axes, which is a central concept in Matplotlib. e.g. the docstring of get_title().

    All latter usages in docstrings should be changed to "Axes".

    Note: This is a tedious task. "axes" is probably one of the most used words in docstrings, and it's also often used in code. I strongly suggest to use advanced searching methods to find possible candidates. E.g. PyCharm supports limiting the search to string-literals. Additionally I suggest, searching case-sensitvie and whole words. We only want to change plain text, no markup such as `~.axes.Axes.scatter` or `~.floating_axes.GridHelperCurveLinear`, so it might be good to actually search for " axes" (including the leading space). That's for narrowing down possible candidates. Each of the results must then be investigated which of the above two categories it belongs to.

    That said, you don't have to do the whole library. It's ok to start with one or a few modules.

  5. jklymak commented on Oct 21, 2020

    @jklymak
    Member

    I'm totally for enforcing this when docs get changed; I'm somewhat more ambivalent about the cost/benefit of a big search-and-replace PR that engenders many rebases.

  6. timhoffm commented on Oct 21, 2020

    @timhoffm
    MemberAuthor

    If we don't search/replace, the policy is effectively useless as only a negligible fraction of docstrings will be changed. Then we could just leave this and not bother at all.

  7. jklymak commented on Oct 21, 2020

    @jklymak
    Member

    Well, maybe it'd be useful to start with a few modules first. I.e. if all of _axes.py were done that would go a long way to making the world more consistent.

  8. added a commit that references this issue on Jan 16, 2022
  9. added a commit that references this issue on Jan 26, 2022
  10. github-actions commented on Aug 25, 2023

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  11. added
    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.
    on Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentationstatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions