Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix #4076. Change how result is stored in point_in_path/point_on_path. #4087

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 2 commits into from
Feb 11, 2015

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Feb 9, 2015

Return indices as signed integers (since that's what Numpy wants).

@mdboom mdboom self-assigned this Feb 9, 2015
def test_picking():
fig, ax = plt.subplots()
col = ax.scatter([0], [0], [1000])
fig.savefig("/home/mdboom/test.png", dpi=fig.dpi)
Copy link
Member

Choose a reason for hiding this comment

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

Detritus from earlier testing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep. Oops. Fixed now.

@mdboom mdboom force-pushed the collection-picking branch from 10955d7 to 095699e Compare February 9, 2015 20:32
…nt_on_path.

Return indices as signed integers (since that's what Numpy wants).
@mdboom mdboom force-pushed the collection-picking branch from 0abf2cb to 0a5eea4 Compare February 10, 2015 18:02
@mdboom
Copy link
Member Author

mdboom commented Feb 10, 2015

This is passing tests, and ready for final review.

@efiring
Copy link
Member

efiring commented Feb 10, 2015

Are there likely side effects without test coverage?

@@ -209,7 +209,7 @@ inline void points_in_path(PointArray &points,
typedef agg::conv_contour<curve_t> contour_t;

size_t i;
for (i = 0; i < result.size(); ++i) {
for (i = 0; i < points.size(); ++i) {
Copy link
Member

Choose a reason for hiding this comment

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

Looping over result seems safer without a check that they are the same size.

@mdboom
Copy link
Member Author

mdboom commented Feb 11, 2015

@efiring: I think this was merely broken by the C++ refactor, and the algorithm itself hasn't changed at all, so I think the opportunity for side effects is low: it's sort of binary works/doesn't work. This PR does add a basic test for this functionality that never existed before just to make sure it doesn't break again.

efiring added a commit that referenced this pull request Feb 11, 2015
Fix #4076. Change how result is stored in point_in_path/point_on_path.
@efiring efiring merged commit 9e700a9 into matplotlib:master Feb 11, 2015
@mdboom mdboom deleted the collection-picking branch March 3, 2015 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants