Bokeh Server with Other Library Charts

I really like Bokeh’s server for interactive plotting.
I really dislike the limited flexibility/features of Glyph charts. Comparing the visuals to other libraries like matplotlib, the latter is more robust and with proper customization, more aesthetically pleasing.

Is it possible to incorporate interactive ability into matplotlib via Bokeh’s server. Ie, best of both worlds? Would be awesome…

Please only comment on Bokeh server, I am aware of ‘from bokeh import mpl’ which can be seen here. This does not incorporate the interactive ability with sliders, checkboxes, etc.

Thanks,

Ben

I really like Bokeh's server for interactive plotting.
I really dislike the limited flexibility/features of Glyph charts. Comparing the visuals to other libraries like matplotlib, the latter is more robust and with proper customization, more aesthetically pleasing.

I don't really think this comment about flexibility is justified, but of course everyone likes what they like. Certainly any concrete, specific, constructive feedback would be welcome.

Is it possible to incorporate interactive ability into matplotlib via Bokeh's server. Ie, best of both worlds? Would be awesome...

Not really. The Bokeh server serves web pages, but its most primary function is to keep a bunch of JS and python objects in sync automatically. Bokeh has both a python "side" and a JS "side", and so the Bokeh server is what keeps those two sides in sync, which in turn is what affords all the interactive possibilities. But MPL has no "JS side" at all so there is nothing that has anything to do with MPL that the Bokeh server could keep in sync.

The only vaguely plausible scenario I can currently imagine: MPL can generate static images, and Bokeh can display static images either by encoding to raw RGBA and using ImageRGBA, or by loading remote .png, .jpg, etc with ImageURL. So a Bokeh server app could generate static MPL images and either encode or serve them. Going further maybe there is a custom extension that could be useful. If this MPL creation and image export happened in a callback then sure, the image static MPL image in a Bokeh served document could be updated. But "tunneling" through static images is the bottom line, and I expect the performance of this would probably not be very good.

Otherwise what would truly be needed is a way to export/translate MPL objects into sync-able Bokeh models. There is "MPL Enhancement Proposal 25" that might provide a path toward this, but it's a large undertaking, and there has not been any movement on that in two years AFAIK. Even still, in that scenario it would still be: *start* with MPL, then *switch to* and continue with Bokeh *from then on*.

Thanks,

Bryan

···

On Nov 30, 2016, at 12:48 PM, [email protected] wrote: