joferkington / mpldatacursor

Interactive "data cursors" (a.k.a. annotation pop-ups) for matplotlib
MIT License
194 stars 47 forks source link

Label vanishes #24

Closed nilswagner closed 10 years ago

nilswagner commented 10 years ago

The annotation created by mpldatacursor vanishes when you pick a "yellow box". a_simple_plot

import matplotlib.pyplot as plt import numpy as np from mpldatacursor import datacursor import mpldatacursor print mpldatacursor.version x = np.linspace(0.,2*np.pi,100) y = np.sin(x) fig = plt.figure('A simple plot') ax = fig.add_subplot(111) ax.plot(x,y) datacursor(formatter='x={x:0.2f}\ny={y:0.2f}'.format,draggable=True,display="multiple") plt.show()

nilswagner commented 10 years ago

It works fine with

mpldatacursor.version '0.4-dev'

It looks like the error has been introduced in 0.5-dev.

joferkington commented 10 years ago

Thanks for the detailed report!

I'll look into it tonight. I think I know what the issue might be.

joferkington commented 10 years ago

Hi Nils,

Thanks again for the catch and detailed issue report! It looks like I stupidly overlooked draggable cursors during my fix for your last bug report. (Thanks for all of bug reports and testing!!)