[Numpy-discussion] Announcing Bokeh 0.2: interactive web plotting for Python

Jason Grout jason-sage at creativetrax.com
Thu Oct 24 11:11:43 EDT 2013


On 10/24/13 9:47 AM, Peter Wang wrote:
> You will still have interactivity *within* plots inside a single
> Notebook, but they will not drive events back to the server side.  Also,
> if your data is large, then the notebook will also get pretty big.  (We
> will be working on more efficient encodings in a future release.)
>

It would be really cool if you could hook into the new IPython comm 
infrastructure to push events back to the server in IPython (this is not 
quite merged yet, but probably ready for experimentation like this). 
The comm infrastructure basically opens up a communication channel 
between objects on the server and the browser.  Messages get sent over 
the normal IPython channels.  The server and browser objects just use 
either send() or an on_message() handler.  See 
https://github.com/ipython/ipython/pull/4195

Here's a very simple example of the Comm implementation working with 
matplotlib images in the Sage Cell server (which is built on top of the 
IPython infrastructure):  http://sagecell.sagemath.org/?q=fyjgmk (I'd 
love to see a bokeh version of this sort of thing :).

FYI, here is the javascript code we use for the above example: 
https://github.com/sagemath/sagecell/blob/master/static/compute_server.js#L768 
and the python code is at 
https://github.com/sagemath/sagecell/blob/master/graphics.py#L399

Thanks,

Jason




More information about the NumPy-Discussion mailing list