> It will work if you explicitly set its transform.
>
> star, = ax.plot([xdata[ind]], [ydata[ind]], '*',
> ms=40, mfc='y', mec='b',
> transform=thisline.get_transform())
>
>
JJ, thank you, this worked in my app as well.
> > I also use the identity of the picked line in my code, since I provide
> > additional information about that data series to the user based on which
> > line (and point) they picked. So if reparenting the line loses that
> > information, that's going to be a problem.
> >
>
> I believe that reparenting only changes the "axes" attribute of the
> line, so it might not be a problem.
>
Yes, it turns out it doesn't seem to cause any problem, which is great.
> > When I was using matplotlib 0.98.5.2, I had the same code as I have now,
> > with two different axes, and pick events were picked up on lines
> belonging
> > to either of the axes. Unless I'm misunderstanding, something has
> changed
> > and this used to be possible. Is that correct?
>
> Yes, I believe this used to be possible. While I'm not sure why it
> changed, I'm also not sure if we need to revert this change as I
> personally prefer the current simple behavior (although there could be
> a room for improvement). And I want to hear what others think. You may
> file a new feature request (or a bug if you want) issue regarding
> this.
>
I don't know if the other developers have weighed in on this in some other
forum or in personal communication, but as a user my vote is to keep the old
behavior. I don't know how much of a simplicity benefit the developer team
gets, but as a user I doubt I would have been able to figure out your
suggestions based on Matplotlib documentation alone, unless maybe I am
missing something. The previous way it worked strikes me as the
user-intuitive way; this new way requires you to move a line to an axis that
it doesn't match but then use its transform to "decode" what it really
should be (if I understand it about right). And then one has to do that for
every line. That seems complex from the user's perspective. Now that it is
all in place it is no problem, but getting here was tough and un-doable
without help. I guess I will file a feature request or bug report about it.
So thank you very much, JJ, for all your help on at least three key details
that massively improve the user experience of the app I am trying to put
together.
And thanks to John and the rest of the developers for Matplotlib!
Che
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users