joferkington / mpldatacursor

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

How to format information when hovering over an image #72

Closed d13g0 closed 8 years ago

d13g0 commented 8 years ago

I noticed that in the image examples you show x,y,z for the coordinates and value of the image pixel. Is there a way to format this. Say, changing the 'z' for the word 'value'. I am not so sure how to achieve this. Thanks.

d13g0 commented 8 years ago

I figured it out sorry.

formatter='x,y = {i:.0f}, {j:.0f}\ncount = {z:.0f}'.format