-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Conversation
lib/matplotlib/artist.py
Outdated
: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. |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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``. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
6b6fcd6
to
46190eb
Compare
Other than those comments, this is definitely an improvement. |
There was a problem hiding this 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.
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