Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Clarify docs of Rectangle#17024
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Docs broke, but in an unrelated file, so I'm not sure why.
lib/matplotlib/patches.py Outdated
@@ -705,8 +705,22 @@ def draw(self, renderer): | |||
class Rectangle(Patch): | |||
""" | |||
A rectangle with lower left at *xy* = (*x*, *y*) with | |||
specified *width*, *height* and rotation *angle*. | |||
A rectangle defined via an anchor point *xy* = (*x*, *y*) and its *width* |
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.
Summary really should be one line, if possible.
lib/matplotlib/patches.py Outdated
%(Patch)s | ||
Other Parameters | ||
---------------- | ||
**kwargs : `Patch` properties |
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.
I think it is unhappy about this reference?
/home/circleci/project/lib/matplotlib/table.py:docstring of matplotlib.table.Cell:123: WARNING: py:obj reference target not found: Patch/home/circleci/project/lib/matplotlib/table.py:docstring of matplotlib.table.CustomCell:90: WARNING: py:obj reference target not found: Patch
but the location makes no sense...
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.
I think it is unhappy about this reference?
/home/circleci/project/lib/matplotlib/table.py:docstring of matplotlib.table.Cell:123: WARNING: py:obj reference target not found: Patch/home/circleci/project/lib/matplotlib/table.py:docstring of matplotlib.table.CustomCell:90: WARNING: py:obj reference target not found: Patch
but the location makes no sense...
Well it does make sense: Wonders of inherited docstrings.
Cell
inherits from rectangle. And likely (I don‘t have code access right now) it reuses the docstring. However, Patch is not in the moduletable
. The solution is to use`.Patch`
. I will fix this later (or anybody can push that change).
I am enthusiastically 👍 on this. |
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.
Anyone can merge on CI green.
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Follow up to#17008, which only went half-way, because it left the "bottom left" description in the summary sentence.
Additional improvements:
Also, we have
get/set_x/y/xy
methods which are all describe in the "bottom left" picture. I think it's ok to leave them as is if we have that picture put into perspective.