[IPython-dev] Interactive Matplotlib in the browser

Michael Droettboom mdroe at stsci.edu
Fri Oct 12 14:20:57 EDT 2012


Yes -- let's test this in as many environments and scenarios as we can.  
Feel free to check out and kick the tires and let me know how it works.

https://github.com/mdboom/mpl_browser_experiments

Thanks to Jason's work to make this work in websockets and some further 
tweaks today, the multi-user scenario is much improved. The difference 
image is computed only once per server and then sent out to all of the 
clients.  So, yes, bandwidth usage increases O(n) (where n is the number 
of clients), but CPU time on the server should be relatively constant.  
It's conceivable that duplicating the data to multiple clients could be 
handled by some sort of multicast proxy.  Obviously, if we were just 
able to send transformation changes to each client, the bandwidth would 
be much smaller.  But that requires moving the rendering into the 
browser, or at least something local that contains all of the data.

Mike

On 10/11/2012 11:45 PM, Brian Granger wrote:
> It is not clear to me that the stream of PNGs will win in the end.  If
> you make a single static plot of a large data set, that is way better
> than trying to send the data to the browser and rendering it there.
> But if you have to send hundreds or thousands of PNGs to get
> interactivity, that benefit may be washed out.  Especially if you have
> multiple users interacting with plots - the server could quickly grind
> to a halt.  I think we should do tests to see how bad it gets, taking
> into account the multiple user question.  The one performance benefit
> that I can think of is that you can tune the level of interactivity to
> limit the data that comes back.  For large data sets, users might be
> willing to settle for less interactivity.  That option doesn't exist
> when you send all the data back.
>
> Cheers,
>
> Brian
>
>
>
> On Thu, Oct 11, 2012 at 2:49 PM, Michael Droettboom <mdroe at stsci.edu> wrote:
>> I have a proof-of-concept way to make interactive plots in the browser work
>> using transparent PNGs described here:
>>
>> http://mdboom.github.com/blog/2012/10/11/matplotlib-in-the-browser-its-coming/
>>
>> No PRs yet, because this is miles from ready for that, but it would be
>> helpful to get some feedback about how this works in different
>> browsers/platforms/network environments etc.
>>
>> Mike
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>
>

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


More information about the IPython-dev mailing list