Skip to content
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

artist picker tolerance has no effect #5475

Closed
mistycheney opened this issue Nov 13, 2015 · 2 comments
Closed

artist picker tolerance has no effect #5475

mistycheney opened this issue Nov 13, 2015 · 2 comments
Assignees
Milestone

Comments

@mistycheney
Copy link

In artist.set_picker(float tolerange), the tolerance argument has no effect. No matter what value it is set to, a pick event is triggered only when click is contained completely within the patch.

@tacaswell tacaswell added this to the next bug fix release (2.0.1) milestone Nov 13, 2015
@tacaswell
Copy link
Member

Can you provide a minimal example?

@mistycheney
Copy link
Author

import matplotlib.pyplot as plt

fig = plt.figure(figsize=(20,20))
ax = fig.add_subplot(111)
ax.set_xlim([0,20])
ax.set_ylim([0,20])
ax.set_aspect('equal')

def on_pick(event):
    print 'picked'

cid = fig.canvas.mpl_connect('pick_event', on_pick)

circle = plt.Circle((10, 10), radius=5, color=(1,0,0))
circle.set_picker(200.)
ax.add_patch(circle)

plt.show()

Note that although I set the picker tolerance to 200., callback is only triggered when I click on the circle itself.

@mdboom mdboom self-assigned this Nov 17, 2015
@mdboom mdboom closed this as completed in a1ed46c Nov 23, 2015
WeatherGod added a commit that referenced this issue Nov 23, 2015
Fix #5475: Support tolerance when picking patches
WeatherGod added a commit that referenced this issue Nov 23, 2015
Fix #5475: Support tolerance when picking patches
@QuLogic QuLogic modified the milestones: v1.5.1, 2.0.1 (next bug fix release) Aug 8, 2016
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

No branches or pull requests

4 participants