[IPython-dev] Matplotlib HTML5 canvas

Ludwig Schwardt ludwig.schwardt at gmail.com
Mon Aug 27 05:42:17 EDT 2012


Hi,

> From: Bob McElrath <bob+ipython at mcelrath.org (mailto:bob+ipython at mcelrath.org)>
> 
> Ah ok then this is nothing new. Mplh5canvas has a separate HTTP server that
> serves up the HTML5 canvas (and so does iPython -- making the two difficult to
> work together). Was the talk just showing existing mplh5canvas functionality?
> Or have they done something new that makes it work better with iPython?
> 
> 


Simon and I integrated the mplh5canvas with the IPython notebook while we were at EuroSciPy, which required some (small) changes to IPython. Previously the canvas opened in a separate browser window instead of in the notebook itself. We also added panning and a cursor returning data coordinates.

It is still a very loose integration based on the separate HTTP server that you mention, but it should be easy to slipstream the communication over IPython's own websockets. This would avoid cross-site scripting restrictions and allow the figure to be resized within the notebook instead of only within its iframe, for example. The dual-server approach works quite well otherwise (though it's clearly sub-optimal).

We wanted to get people interested and show them what's already possible in the notebook, so this was more a proof of concept. I'm sure Simon can make the relevant IPython changes available somewhere too.

Regards,

Ludwig

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20120827/6c236ff1/attachment.html>


More information about the IPython-dev mailing list