title: Is it actually possible to pass data (callback) from mpld3 to ipython?
body: <p>There is a lot of amazing possibilities to create animated pictures using <code>mpld3</code>. However, it seems that all the "moving parts" are responsibility of JavaScript. Moreover, there are lots of requests on the internet and Stack Overflow where people directly ask for that possibility.</p>
  
  <p><a href="https://stackoverflow.com/questions/26532327/retrieve-data-from-dynamic-mpld3-plot-in-python">Retrieve Data From Dynamic mpld3 plot in python</a></p>
  
  <p><a href="https://stackoverflow.com/questions/24498322/get-point-information-after-dragging?rq=1">Get point information after dragging</a></p>
  
  <p><a href="https://stackoverflow.com/questions/26619698/how-to-dump-points-selected-with-the-linkedbrush-plugin-for-mpld3?rq=1">How to &quot;dump&quot; points selected with the LinkedBrush plugin for mpld3?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/33108218/mpld3-select-points-and-get-their-coordinates?rq=1">mpld3 ~ Select points and get their coordinates?</a></p>
  
  <p>with references therein, but all the answers are WRONG, since they propose to use some kind of alerts or captions. The second link is, however, most interesting, since it suggests to add some HTML-form and push the button to send the data to "server-python" from the "client-javascript". There is another interesting notebook</p>
  
  <p><a href="http://nbviewer.jupyter.org/gist/aflaxman/11156203" rel="noreferrer">http://nbviewer.jupyter.org/gist/aflaxman/11156203</a></p>
  
  <p>which is mentioned by many people as a source of inspiration - it saves the output configuration the .html file. Maybe this hard-disk exchange can be used to proceed this information further by python.</p>
  
  <p>Moving further, I discovered <code>IPYwidgets</code>, with plenty of examples and even possibilities of TRUE interaction client-server. Essentially, we may start from basic sliders and buttons, but then we see that some more complex packages are built on this basis: mainly <code>bqplot</code>, and some other inherited packages.</p>
  
  <p>What I want - is just to drag and drop some points on the picture, and then pass them to iPython to make some further plots - it is very complicated and definitely can't be moved to JavaScript. But it seems that despite the team of <code>bqplot</code> has done a huge work, you can use only some "predefined" set of interactions, so the drag-and-drop behavior is again not included.</p>
  
  <p>When I tried (not very deeply) to enter the source code of mpld3 and modify it and possibly merge with ipywidgets, I encountered that many things are deprecated, the code evolves really fast, which doesn't accord to the existing examples in the internet: most poplar ones are very old, and inquiries are also very old. So I couldn't do anything because of the mess, many examples fail because of lack of backward-compatibility.</p>
  
  <p><strong>Summary.</strong> I would be glad if anyone provided some way to drag-and-drop points and to pass their coordinates to python, but which could me more helpful - is the ability to pass information from mpld3 in a more "abstract manner", so that other cases can be included.</p>