Skip to content
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

issues with errorbar #83

Open
jacobpierce1 opened this issue Dec 7, 2017 · 0 comments
Open

issues with errorbar #83

jacobpierce1 opened this issue Dec 7, 2017 · 0 comments

Comments

@jacobpierce1
Copy link

jacobpierce1 commented Dec 7, 2017

Hi, thanks for the excellent library. I am trying to extend the basic example of matplotlib.pyplot.scatter to matplotlib.pyplot.errorbar without success. Example code:

import numpy as np
import matplotlib.pyplot as plt
import mpldatacursor

x, y, z = np.random.random((3, 10))
fig, ax = plt.subplots()

# works as expected with this uncommented:
# ax.scatter(x, y, label = 'test' )

# doesn't work with an errorbar:
ax.errorbar(x, y, xerr=1, yerr=1, ls='none', label = 'test' )



mpldatacursor.datacursor( formatter = '{label}'.format )
plt.show( )
 

The expected behavior is that when one of the errorbars is clicked on, the mpldatacursor will show 'test', as it does with the scatter plot. Instead, it shows '_nolegend_'. Not sure if it's a bug or if I'm just not using the mpldatacursor correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant