Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[mpl_toolkits] Things drawn on parasite axes don't fire pick events #5581

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

Closed
smheidrich opened this issue Nov 29, 2015 · 0 comments
Closed

Comments

@smheidrich
Copy link
Contributor

Description

pick_events aren't fired for things that are drawn on parasite axes which were created using the twin* methods on mpl_toolkits.axes_grid1.host_subplot host axes.

How to reproduce

Code

from matplotlib import pyplot as plt
from mpl_toolkits.axes_grid1 import host_subplot
from numpy import arange, sin, pi

host_a = host_subplot(111)
para_a = host_a.twin()
# This works:
# a = host_a
# This doesn't:
a = para_a

t = arange(0.0, 3.0, 0.01)
s = sin(2*pi*t)
line, = a.plot(t, s, picker=5)

def onpick(event):
  print("picked")
plt.gcf().canvas.mpl_connect('pick_event', onpick)

plt.show()

Steps

  1. Click on the curve that is drawn.
  2. Check if "picked" was written to standard output.

It works fine if the curve is drawn to the host axes, but it doesn't work if it's drawn on the parasite axes instead.

Info

See also #5580 .

Matplotlib version: 6245d4e
Python version: Any

@smheidrich smheidrich changed the title [mpl_toolkits] Things drawn on paraste axes don't fire pick events [mpl_toolkits] Things drawn on parasite axes don't fire pick events Nov 29, 2015
@tacaswell tacaswell added this to the proposed next point release (2.1) milestone Nov 30, 2015
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Oct 3, 2017
smheidrich added a commit to smheidrich/matplotlib that referenced this issue Jan 4, 2019
smheidrich added a commit to smheidrich/matplotlib that referenced this issue Jan 4, 2019
smheidrich added a commit to smheidrich/matplotlib that referenced this issue Jan 4, 2019
smheidrich added a commit to smheidrich/matplotlib that referenced this issue Feb 9, 2019
smheidrich added a commit to smheidrich/matplotlib that referenced this issue Feb 10, 2019
smheidrich added a commit to smheidrich/matplotlib that referenced this issue Feb 10, 2019
smheidrich added a commit to smheidrich/matplotlib that referenced this issue Feb 10, 2019
smheidrich added a commit to smheidrich/matplotlib that referenced this issue Feb 11, 2019
smheidrich added a commit to smheidrich/matplotlib that referenced this issue Feb 12, 2019
smheidrich added a commit to smheidrich/matplotlib that referenced this issue Feb 12, 2019
@QuLogic QuLogic modified the milestones: needs sorting, v3.1.0 Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants