🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@anntzer
Copy link
Contributor

@anntzer anntzer commented Mar 5, 2020

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 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
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.
The `Legend` class is a container of legend handles and legend texts.
The legend handler map specifies how to create legend handles from artists
(lines, patches, etc.) in the axes or figures. Default legend handlers are defined
in the :mod:`~matplotlib.legend_handler` module. While not all artist types are
coverd by the default legend handlers, one can define custom legend handlers
to support arbitrary objects.
See the :doc:`legend guide </tutorials/intermediate/legend_guide>` for more
information.

Copy link
Contributor Author

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

@timhoffm timhoffm 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 the rcParams to mpl.rcParams for which we already have precedence. So let‘s not waste valuable developer time on a second review.

@timhoffm timhoffm merged commit 7ac7256 into matplotlib:master Mar 6, 2020
@anntzer anntzer deleted the legend branch March 6, 2020 09:32
@anntzer anntzer added this to the v3.3.0 milestone Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants