matplotlib xulrunner.

Hello,

I work on a xulrunner application. Xulrunner is the future "mozilla/gecko/xul"-based application launcher (java command of the JVM).
For instance, Firefox 3 will be a xulrunner application et will not comme with all the gecko machine (like the java JVM and a java application).

I would like to use matplotlib in XUL (the bracket XML language for GUI design in the mozilla world).
The only way to show an image is with the HTML element <img src="..."/> or <img data="..."/>.

I 've read matplolib tutorial about the Agg backend. It's written GTKAgg backend use the same process.
I'd like to know weither the GTKAgg backend consist "simply" in showing an image created with the Agg backend,
and handling all events (building a rectangle for zoom et make a zoom request, Rebuilding the image when the window is resized ...) ?

If I'm correct, it would be possible to implement events for the <img/> element and update the image when it needs like GTKAgg.
Am I right about GTKAgg ?

Would it be enough fast to work interactively ?

Thanks a lot,

Cyril.

I work on a xulrunner application. Xulrunner is the future
"mozilla/gecko/xul"-based application launcher (java command of the JVM).
For instance, Firefox 3 will be a xulrunner application et will not
comme with all the gecko machine (like the java JVM and a java application).

I would like to use matplotlib in XUL (the bracket XML language for GUI
design in the mozilla world).
The only way to show an image is with the HTML element <img src="..."/>
or <img data="..."/>.

I 've read matplolib tutorial about the Agg backend. It's written GTKAgg
backend use the same process.
I'd like to know weither the GTKAgg backend consist "simply" in showing
an image created with the Agg backend,
and handling all events (building a rectangle for zoom et make a zoom
request, Rebuilding the image when the window is resized ...) ?

Yes and no. You can think of it as the GTKAgg backend simply wrapping
the Agg backend for rendering the image, but the GTKAgg backend also
simply wraps the GTK backend for doing all the event handling.
Likewise the GTK backend forwards events to matplotlib's base classes.
Looking thorugh the backend_template.py file helped me.

If I'm correct, it would be possible to implement events for the <img/>
element and update the image when it needs like GTKAgg.
Am I right about GTKAgg ?

As far as the image management, it is pretty easy to just use the
classes found in backend_agg.py to plot and grab the image buffer.
Event handling would also consist of calling the base classes found in
backend_bases.py. I don't know if your needs quite justify a
full-fledged new backend, but it could certainly be done that way.

Would it be enough fast to work interactively ?

Using the blitting ability of Agg it should definitely be.
http://www.scipy.org/Cookbook/Matplotlib/Animations

- Charlie