8000 Added RectangleSelector.geometry docstring by tropfcode · Pull Request #9031 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Added RectangleSelector.geometry docstring #9031

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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added RectangleSelector.geometry docstring
Docstring contains details specific to RectangleSelector and does not fully generalize to EllipseSelector.
  • Loading branch information
tropfcode authored Aug 14, 2017
commit 6f73f0673c5a99e3ceea7d6633eabd09b5243eae
5 changes: 5 additions & 0 deletions lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,11 @@ def _set_active_handle(self, event):

@property
def geometry(self):
"""
Copy link
Member

Choose a reason for hiding this comment

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

Sorry I missed this before, but the whole string will need to be indented by 4 spaces (instead of the current 2) to line up with the if statement below.

Returns numpy.ndarray of shape (2,5) containing x (RectangleSelector.geometry[1:])
Copy link
Member

Choose a reason for hiding this comment

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

All of the lines need to be wrapped to < 80 characters for PEP8 tests to pass.

and y (RectangleSelector.geometry[0:]) coordinates of the four corners of the rectangle starting
and ending in the top left corner.
"""
if hasattr(self.to_draw, 'get_verts'):
xfm = self.ax.transData.inverted()
y, x = xfm.transform(self.to_draw.get_verts()).T
Expand Down
0