This is just a doc oversight – I’ll fix it.
I think your solution is the right way to do it with the exiting mpl infrastructure, though one could use the “blit” api to make it a little more efficient to redraw just the needed artists rather than the whole figure each time (doing this would further complicate the code). Since you call your approach “ugly, and conceptually wrong”, perhaps you can sketch what you think the right interface should be for something like this, and we will see if there is anything we can do within the existing mpl infrastructure to make it easier.
FYI, check out the canvas.onHilite implementation, which shows how to use a hover to highlight individual artists (title, axes, xlabel, ylabel, ticklabel etc). This problem is a little
easier, since what you are doing is triggering an action on artist B when artist A is hovered over.
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_title('hover over me')
On Wed, Apr 15, 2009 at 8:03 AM, Vito De Tullio <zak.mc.kraken@…1348…> wrote:
Gregor Thalhammer wrote:
I didn’t understand what you mean by ‘plot nodes’
the markers, sorry
, but there exist
figure_enter_event, figure_leave_event, axes_enter_event and
first of all: why these *_enter_event and *_leave_event aren’t in