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

Merged
merged 2 commits into from May 3, 2013

Projects

None yet

3 participants

@ChrMa
ChrMa 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

@mdboom mdboom was assigned May 3, 2013
@mdboom
Member
mdboom commented May 3, 2013

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

@pelson
Member
pelson commented May 3, 2013

Again - looks good but needs a small test. 👍

@mdboom mdboom added a commit to mdboom/matplotlib that referenced this pull request May 3, 2013
@mdboom mdboom Add test for #1973 4674ee2
@ChrMa
ChrMa commented May 3, 2013

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

@ChrMa
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 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