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

Docstring + import cleanups to legend.py.#16674

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
timhoffm merged 1 commit intomatplotlib:masterfromanntzer:legend
Mar 6, 2020

Conversation

anntzer
Copy link
Contributor

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Comment on lines 12 to 19
The Legend class is a container of legend handles and legend texts. The legend
handler map specifies how to create legend handle from artists (lines, patches,
etc.) in the axes or figures; default legend handlers are defined in the
:mod:`~matplotlib.legend_handler` module.

The default legend handlers do not cover all artist types, but custom legend
handlers can be defined to support arbitrary objects. See the :doc:`legend
guide </tutorials/intermediate/legend_guide>` for more information.
Copy link
Member

Choose a reason for hiding this comment

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

Different sectioning and minor formatting/wording/typo:

Suggested change
TheLegendclassisacontaineroflegendhandlesandlegendtexts.Thelegend
handlermapspecifieshowtocreatelegendhandlefromartists (lines,patches,
etc.)intheaxesorfigures;defaultlegendhandlersaredefinedinthe
:mod:`~matplotlib.legend_handler`module.
Thedefaultlegendhandlersdonotcoverallartisttypes,butcustomlegend
handlerscanbedefinedtosupportarbitraryobjects.Seethe :doc:`legend
guide</tutorials/intermediate/legend_guide>`formoreinformation.
The`Legend`classisacontaineroflegendhandlesandlegendtexts.
Thelegendhandlermapspecifieshowtocreatelegendhandlesfromartists
(lines,patches,etc.)intheaxesorfigures.Defaultlegendhandlersaredefined
inthe :mod:`~matplotlib.legend_handler`module.Whilenotallartisttypesare
coverdbythedefaultlegendhandlers,onecandefinecustomlegendhandlers
tosupportarbitraryobjects.
Seethe :doc:`legend guide </tutorials/intermediate/legend_guide>`formore
information.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

done (with small additional edits)

- Reword the module docstring.- Don't import rcParams.
Copy link
Member

@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‘ll be so bold as to merge with one review. The only non-doc change is thercParams tompl.rcParams for which we already have precedence. So let‘s not waste valuable developer time on a second review.

@timhoffmtimhoffm merged commit7ac7256 intomatplotlib:masterMar 6, 2020
@anntzeranntzer deleted the legend branchMarch 6, 2020 09:32
@anntzeranntzer added this to thev3.3.0 milestoneMar 6, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.3.0
Development

Successfully merging this pull request may close these issues.

2 participants
@anntzer@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp