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

Event picking does not seem to work on polar bar plots #7655

Closed
kasperloopstra1 opened this issue Dec 21, 2016 · 1 comment · Fixed by #7844
Closed

Event picking does not seem to work on polar bar plots #7655

kasperloopstra1 opened this issue Dec 21, 2016 · 1 comment · Fixed by #7844
Milestone

Comments

@kasperloopstra1
Copy link

kasperloopstra1 commented Dec 21, 2016

The minimal example provided below has been tested on Windows 10, Python 3.5.2 (Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32 ), matplotlib 1.5.3.

Running the code below results in events being printed for the Cartesian bar plot, but not for the polar bar plot. Changing the bar plots to scatter plots works for both Cartesian scatter plots and polar scatter plots.


 
#!/usr/bin/env python3
import matplotlib.pyplot as plt
 
def onpick(event):
    print(event) #Only events from fig2 are shown
    return True
rect=[.1,.1,.8,.8]
fig1 = plt.figure()
ax = fig1.add_axes(rect,polar=True)
ax.bar(1, 2,   picker=True)
fig1.canvas.mpl_connect('pick_event',onpick)

fig2 = plt.figure()
ax2 = fig2.add_axes(rect,polar=False)
ax2.bar(1, 2,  picker=True)
fig2.canvas.mpl_connect('pick_event',onpick)
plt.show()

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Dec 21, 2016
@anntzer
Copy link
Contributor

anntzer commented Jan 17, 2017

This is fixed by the yet-to-be-merged #7844 (which was originally written for #3540 but it's essentially the same issue).

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

Successfully merging a pull request may close this issue.

4 participants