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

Appearance settings

Docstring of legend() should mention legend(handles=handles) #20213

Copy link
Copy link
Closed
@anntzer

Description

@anntzer
Issue body actions

Problem

The docstring of legend() currently states

        Call signatures::

            legend()
            legend(labels)
            legend(handles, labels)

so the signature legend(handles=handles) is missing (it is explicitly listed in _parse_legend_args). I think that signature is actually the second most important one (after legend()) given that it's the applicable one in a pure OO setting (where labels are directly set on the artists), so it should be added and the rest of the docstring amended accordingly.

Suggested Improvement

See above.

Matplotlib version

  • Operating system: linux
  • Matplotlib version (import matplotlib; print(matplotlib.__version__)): HEAD (3.4.x)
  • Matplotlib documentation version (is listed under the logo): 3.4.x
story645 and timhoffm

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.