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

Conversation

@timhoffm
Copy link
Member

@timhoffm timhoffm commented Apr 4, 2020

PR Summary

Follow up to #17008, which only went half-way, because it left the "bottom left" description in the summary sentence.

Additional improvements:

  • Added an ASCII image for illustration
  • Commented on the left/right bottom/top corner position of xy. IMHO the "bottom left" idea is helpful to imagine the rectangle, it just has to be taken with the caution of orientations.
    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.
  • Moved the Patch properties from section Notes to Other Parameters.
  • Removed explicit documentation of fill because it's already documented via the Patch properties.

@timhoffm timhoffm added this to the v3.3.0 milestone Apr 4, 2020
Copy link
Member

@QuLogic QuLogic left a 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.

"""
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*
Copy link
Member

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.

%(Patch)s
Other Parameters
----------------
**kwargs : `Patch` properties
Copy link
Member

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...

Copy link
Member Author

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 module table. The solution is to use `.Patch`. I will fix this later (or anybody can push that change).

@tacaswell
Copy link
Member

I am enthusiastically 👍 on this.

Copy link
Member

@tacaswell tacaswell left a 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.

@anntzer anntzer merged commit de4933c into matplotlib:master Apr 7, 2020
@timhoffm timhoffm deleted the doc-rectangle branch April 7, 2020 15:03
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.

4 participants