Skip to content
  • Sponsor matplotlib/matplotlib

  • Notifications You must be signed in to change notification settings
  • Fork 7.9k

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

Closed
@kasperloopstra1

Description

@kasperloopstra1

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()

Activity

added this to the 2.1 (next point release) milestone on Dec 21, 2016
anntzer

anntzer commented on Jan 17, 2017

@anntzer
Contributor

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Event picking does not seem to work on polar bar plots · Issue #7655 · matplotlib/matplotlib