Open chan-y-park opened 9 years ago
Thanks for the bug report, and sorry for my delay in responding!
As for the first problem, any time the pyplot interface isn't used to create the figure, there's no way to detect which figures/axes exist. Therefore, anytime you bypass pyplot
(e.g. embedding in a gui), you'll have to explicitly specify which axes or artists mpldatacursor
should work with. I should make this more clear in the documentation, though.
For the second part, it looks like timers aren't implemented at all for the webagg
backend. This is a bug in matplotlib, but I should be handling it in mpldatacursor
regardless. I've added a workaround in 7531fe287eb774bbeaed8a7e1c0371a41bd7d86b that should mask the problem. You'll have slightly worse performance for backends that don't implement timers, but webagg
is going to have poor performance regardless.
If you have a chance, try installing from git master and let me know if this fixes your problem (it does for me, but you may hit other issues). I'll probably release another point release soon that will include this fix as well as a couple of others.
Thank you so much for the help! I will try it and get back to you. By the way, could you report to the matplotlib
community that there is such a bug in webagg
? It would be nice if webagg
can grow into one of the standard backends.
Dear Joe,
First of all, thank you so much for the last feedback about
mpldatacursor
onJupyter
notebook!This time I am trying a bit different thing, which is using
matplotlib
webagg
backend. It seems that the backend is a very nice one to build a web UI formatplotlib
and I would like to usempldatacursor
with it, but when I naively putmpldatacursor.datacursor()
in the source code of https://github.com/matplotlib/matplotlib/blob/master/examples/user_interfaces/embedding_webagg.py, that is,It doesn't complain but nothing happens in the plot. Then I tried something different,
Then I get the following error:
Will it be a huge work to make
mpldatacursor
work withwebagg
? If that can be done then it would be really awesome!Best, Chan