Skip to content

Fix #5670. No double endpoints in Path.to_polygon #5672

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 3 commits into from
Dec 15, 2015
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
Fix unit tests
  • Loading branch information
mdboom committed Dec 14, 2015
commit 66a4f889f58cf1a35a27a05ece869523a0425ceb
2 changes: 1 addition & 1 deletion lib/matplotlib/tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def onselect(epress, erelease):
extents = [int(e) for e in tool.extents]
assert extents == [70, 129, 70, 130], extents

assert tool.geometry.shape == (2, 74)
assert tool.geometry.shape == (2, 73)
assert_allclose(tool.geometry[:, 0], [70., 100])


Expand Down
6 changes: 3 additions & 3 deletions lib/matplotlib/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def on_clicked(self, func):
"""
When the button is clicked, call this *func* with event.

A connection id is returned. It can be used to disconnect
A connection id is returned. It can be used to disconnect
the button from its callback.
"""
cid = self.cnt
Expand All @@ -265,7 +265,7 @@ class Slider(AxesWidget):
"""
A slider representing a floating point range.

For the slider to remain responsive you must maintain a
For the slider to remain responsive you must maintain a
reference to it.

The following attributes are defined
Expand Down Expand Up @@ -2036,7 +2036,7 @@ def geometry(self):
if hasattr(self.to_draw, 'get_verts'):
xfm = self.ax.transData.inverted()
y, x = xfm.transform(self.to_draw.get_verts()).T
return np.array([x[:-1], y[:-1]])
return np.array([x, y])
else:
return np.array(self.to_draw.get_data())

Expand Down