Closed jondo closed 9 years ago
Sure! That's the purpose of the point_labels
kwarg.
However, there's one caveat. It will work fine with plot
but requires something that matplotlib internally treats as a sequence, so it doesn't work with bar
and a few other things that one might expect it to.
As a basic example, see this: https://github.com/joferkington/mpldatacursor/blob/master/examples/labeled_points_example.py
Thank you, that works great! Sorry for just browsing the README and not the examples or the class definition.
May I suggest an improvement? It would be nice to have an option to just show the first and last label in case of several data points at the same position (instead of listing all the labels). Edit: I filed this as https://github.com/joferkington/mpldatacursor/issues/40.
I have got data consisting of three columns: two coordinates
x
,y
and a timestampt
. I am plotting only the coordinate data:plt.plot(x, y, '.')
.Is it possible to also show the timestamp in the data cursor?