Collection's contains method doesn't honour offset_position attribute #1973

Merged
merged 2 commits into from May 3, 2013

Conversation

Projects
None yet
3 participants
Owner

mdboom commented May 3, 2013

The contains method of Collection objects doesn't honour the newly introduced _offset_position attribute, making it fail when _offset_position == "data".
I noticed this when trying to add a pick_event handler to a hexbin plot, which does not work properly with matplotlob 1.2.x

@ghost ghost assigned mdboom May 3, 2013

Owner

mdboom commented May 3, 2013

@ChrMa: Can you confirm the attached patch fixes your bug?

Member

pelson commented May 3, 2013

Again - looks good but needs a small test. 👍

mdboom added a commit to mdboom/matplotlib that referenced this pull request May 3, 2013

ChrMa commented May 3, 2013

@mdboom: Thank you for the quick response. The fix is working perfectly.

ChrMa commented May 3, 2013

As for the test, you might want to add something like picker=1 to the hexbin call to avoid getting a UserWarning about picker being None.

mdboom added a commit that referenced this pull request May 3, 2013

Merge pull request #1973 from mdboom/pick_path_collection_data_offset…
…_position

Collection's contains method doesn't honour offset_position attribute

@mdboom mdboom merged commit eae5e43 into matplotlib:v1.2.x May 3, 2013

1 check passed

default The Travis build passed
Details

@mdboom mdboom deleted the mdboom:pick_path_collection_data_offset_position branch Aug 7, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment