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

Better document Axes.set() #19884

Closed
Closed
Milestone
@timhoffm

Description

@timhoffm

Problem

The property batch setter is a nice way for a more compact configuration compared to various lines ofax.set_*() calls.

(Note: using kwargs is quite common with other plotting libraries, so this approach seems generally appealing).

Axes.set() is essentially undocumented:

Suggested Improvement

  • We should re-introduceAxes.set into the API docs.

  • That method needs a more approachable description than "A property batch setter. Pass kwargs to set properties."

  • Ideally, the signature should be explicit and not**kwargs, which would enable completion. There are two possible ways of doing this:

    1. Dynamically rewrite the signature.
    2. Hard-code the signature and add a test, that the parameters match the available properties.

    The first one has the advantage that this would trivially expand to all artists.
    The second one has the advantage that we can easily specify a meaningful order. Since we rarely change the available properties, hard-coding with a test would be good enough.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp