1

I am working on a python 2.7+matplotlib+tkinter project where I need to plot up to 60 plots on 1 figure (I can show/hide them then by pressing corresponding legend title and do some other interactive stuff). What I want is to get an annotation box on mouse-over event with the label of current plot. I was thinking about text annotation, but I haven't found any ways to do it interactively.

If it is crucial for an answer - I am working with step and scatter figures. I am ready to provide any information needed, for now I just can't think of something necessary to post here (in terms of source code)

arbulgazar
  • 1,931
  • 1
  • 19
  • 24
  • 1
    see [this](http://stackoverflow.com/questions/7908636/possible-to-make-labels-appear-when-hovering-over-a-point-in-matplotlib) question – M4rtini Feb 14 '14 at 09:38
  • Thank you! Haven't found it for some reason. – arbulgazar Feb 14 '14 at 10:13
  • 1
    Just to plug my own project: Have a look at `mpldatacursor` https://github.com/joferkington/mpldatacursor as well. If you'd like the annotation to pop up on mouse-over instead of when the artist (line, etc) is clicked on, then just use `datacursor(hover=True)`. You'll probably want to control the text displayed with the `formatter` kwarg. In your case, it might be as simple as `datacursor(formatter='{label}'.format, hover=True)`. – Joe Kington Feb 14 '14 at 16:30

0 Answers0