Using the Agg renderer by itself

Hi Chris and others,

There is an HTML5 backend, supposedly. Don’t know how well documented it is, though.

Hmm – coll idea – I’ll look into that at some point. However, as I

don’t need the MPL machinerey, but just the renderer, I’m not sure it

would buy me much.

And I’m not sure I can:

a) count on html 5 on all browsers we need to support

or

b) get the drawing performance I want if I have to push all the data to

the client to draw.

But something to keep an eye on, thanks.

Ben is referring to mplh5canvas, available at http://code.google.com/p/mplh5canvas/. The main advantage of this approach is interactive zooming of plots within the browser. If this is not important to you, it will probably be faster to generate static PNGs or SVGs.

The HTML5 backend should be easy to try out, as it is a pure Python package with no onerous dependencies.

I’ll try to address your concerns mentioned above:

a) The Canvas element is quite well supported in modern browsers, but the WebSocket component (used to communicate between the matplotlib backend “server” code in Python and the “client” code on the browser in JavaScript) is a bit trickier to support.

b) Here the matplotlib machinery actually helps, by reducing the primitives to draw via path simplification before sending them to the client browser.

We have also used flot (http://code.google.com/p/flot/) for simple time-series plots without matplotlib. I’m not sure how well it performs on large data sets, though.

Regards,

Ludwig

···

On 11/23/11 12:39 PM, Chris Barker wrote:

On 11/23/11 10:38 AM, Benjamin Root wrote: