8000 Fix docstring of set_clip_path. by anntzer · Pull Request #8980 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix docstring of set_clip_path. #8980

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2017

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented Aug 2, 2017

Most importantly, document that transform must be set if path is a
Path instance.

Also fix some rst markup and improve the exception message.

xref #8974 (comment)

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 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

:class:`~matplotlib.transforms.Transform` instance, which will be
applied to the path before using it for clipping, must be provided;
or
- ``None``, to remove the clipping path.
Copy link
Member

Choose a reason for hiding this comment

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

"to remove a previously set clipping path"

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

corresponding rectangle and set the clipping path to *None*.
For efficiency, if the path happens to be an axis-aligned rectangle,
this method will set the clipping box to the corresponding rectangle
and set the clipping path to ``None``.
Copy link
Member

Choose a reason for hiding this comment

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

Do we have any docs elsewhere that explains the clipping path/box distinction? If so, it would be nice to reference it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure. Feel free to push or force-push a fix to the PR.

Most importantly, document that transform *must* be set if path is a
Path instance.

Also fix some rst markup and improve the exception message.
@anntzer anntzer force-pushed the clip_path_docstring branch from 6b6fcd6 to 46190eb Compare August 2, 2017 15:58
@WeatherGod
Copy link
Member

Other than those comments, this is definitely an improvement.

Copy link
Member
@WeatherGod WeatherGod left a comment

Choose a reason for hiding this comment

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

Yeah, I can't find such documentation. Might be worth writing up at some point, but not a reason to hold this up.

@WeatherGod WeatherGod merged commit a57a80c into matplotlib:master Aug 2, 2017
@anntzer anntzer deleted the clip_path_docstring branch August 2, 2017 22:35
@QuLogic QuLogic modified the milestone: 2.1 (next point release) Aug 7, 2017
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.

3 participants
0