web gui

Hi,

could someone please point me to the latest status of the web gui?

I am now in LLNL and I don't have a root access to my computer
(running rhel5), and there is no Tk, nor Tkinter Python modules. I
have installed femhub, so I have the whole python stack, but I don't
have any gui. Mpl can save figures to a file, so at least something.
But I am missing the zoom feature.

I found the following cool libraries:

http://www.sencha.com/
http://raphaeljs.com/
http://g.raphaeljs.com/

that work perfectly in my browser (FF3). So I wondered how hard it
would be to use them as an mpl backend? All I need, I think, is just
simple plotting, and zoom (+pan).

I could adapt for example:

lib/matplotlib/backends/backend_tkagg.py

but it seems quite involved. Is there some simple thing, that would
"just work" for me, that I could start adapting for the web gui? I
would imagine that show() would launch a web server and tell the user
to go to localhost:8080 or something and then the gui would be in the
browser. The browser can even be opened automatically.

Ondrej

Hi,

could someone please point me to the latest status of the web gui?

I am now in LLNL and I don't have a root access to my computer
(running rhel5), and there is no Tk, nor Tkinter Python modules. I
have installed femhub, so I have the whole python stack, but I don't
have any gui. Mpl can save figures to a file, so at least something.
But I am missing the zoom feature.

I found the following cool libraries:

http://www.sencha.com/
http://raphaeljs.com/
http://g.raphaeljs.com/

that work perfectly in my browser (FF3). So I wondered how hard it
would be to use them as an mpl backend? All I need, I think, is just
simple plotting, and zoom (+pan).

I doubt that you could make zoom/pan fast while going through a web interface, without substantial changes to mpl.

As an alternative, can you install gtk and pygtk from tarballs, in locations you control? I haven't tried it, so I have no idea how painful it would be; but if it works, you would have a fully-functional mpl.

Actually, on RH, I'm sure the gtk libraries are already there, so it would be a question of whether the -devel rpms are also installed. If so, all you need would be pygtk, and that should be easy.

I presume you have already tried to get IT support to install things like pygtk.

Eric

···

On 06/16/2010 12:06 PM, Ondrej Certik wrote:

I could adapt for example:

lib/matplotlib/backends/backend_tkagg.py

but it seems quite involved. Is there some simple thing, that would
"just work" for me, that I could start adapting for the web gui? I
would imagine that show() would launch a web server and tell the user
to go to localhost:8080 or something and then the gui would be in the
browser. The browser can even be opened automatically.

Ondrej

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

Hi Ondrej,

If I was in your shoes, the first thing I'd do is emit your data to plot
as a json object and then plot that data using javascript with one of
the libraries you've listed. Then, after gaining some familiarity with
Python->json->javascript I'd think about how such an MPL backend might
work. A usecase I could imagine is some Django app that uses MPL to plot
stuff into a javascript canvas element complete with zooming and so on.

I think there are a lot of open questions in this domain... For example,
presumably one doesn't want the server involved when the client browser
zooms. But then if you implement something that allows the client
browser to zoom without the server MPL process, you're no longer using
the normal MPL callback system. So, interactivity would probably be
different than in the traditional backends.

You could also start with the svg backend, as browsers do render svg.

-Andrew

Ondrej Certik wrote:

···

Hi,

could someone please point me to the latest status of the web gui?

I am now in LLNL and I don't have a root access to my computer
(running rhel5), and there is no Tk, nor Tkinter Python modules. I
have installed femhub, so I have the whole python stack, but I don't
have any gui. Mpl can save figures to a file, so at least something.
But I am missing the zoom feature.

I found the following cool libraries:

http://www.sencha.com/
http://raphaeljs.com/
http://g.raphaeljs.com/

that work perfectly in my browser (FF3). So I wondered how hard it
would be to use them as an mpl backend? All I need, I think, is just
simple plotting, and zoom (+pan).

I could adapt for example:

lib/matplotlib/backends/backend_tkagg.py

but it seems quite involved. Is there some simple thing, that would
"just work" for me, that I could start adapting for the web gui? I
would imagine that show() would launch a web server and tell the user
to go to localhost:8080 or something and then the gui would be in the
browser. The browser can even be opened automatically.

Ondrej

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

I have a student here trying to make a webapp for data reduction. To add interactivity, we’ve been using the FLOT package, and may later consider protovis. We had thought about making a javascript backend for MPL, but to just get something running, we went with FLOT for the time being…We’re using EXTJS as the web framework (it’s a bit heavy, but has a rich widget toolkit and documentation). We use Django on the backend and Orbited to deal with some communications between the browser and the server (for example if we get new data from an instrument and want to update it on the server and update plots that are viewing that data…). Over the next couple of weeks (with the arrival of another student), we will be working more with the plotting aspect of the project (adding legends, zooming, etc). Also, for other parts of the app, we’re just using the HTML5 canvas…I’d be happy to work on making the plotting addons as generic as possible so they can be used outside of our problem domain. What I’m not sure is whether one wants to truly use MPL as a backend, or rather to use the MPL philosophy of a javascript package.

Cheers,

William

···

On Wed, Jun 16, 2010 at 6:45 PM, Andrew Straw <strawman@…36…> wrote:

Hi Ondrej,

If I was in your shoes, the first thing I’d do is emit your data to plot

as a json object and then plot that data using javascript with one of

the libraries you’ve listed. Then, after gaining some familiarity with

Python->json->javascript I’d think about how such an MPL backend might

work. A usecase I could imagine is some Django app that uses MPL to plot

stuff into a javascript canvas element complete with zooming and so on.

I think there are a lot of open questions in this domain… For example,

presumably one doesn’t want the server involved when the client browser

zooms. But then if you implement something that allows the client

browser to zoom without the server MPL process, you’re no longer using

the normal MPL callback system. So, interactivity would probably be

different than in the traditional backends.

You could also start with the svg backend, as browsers do render svg.

-Andrew

Ondrej Certik wrote:

Hi,

could someone please point me to the latest status of the web gui?

I am now in LLNL and I don’t have a root access to my computer

(running rhel5), and there is no Tk, nor Tkinter Python modules. I

have installed femhub, so I have the whole python stack, but I don’t

have any gui. Mpl can save figures to a file, so at least something.

But I am missing the zoom feature.

I found the following cool libraries:

http://www.sencha.com/

http://raphaeljs.com/

http://g.raphaeljs.com/

that work perfectly in my browser (FF3). So I wondered how hard it

would be to use them as an mpl backend? All I need, I think, is just

simple plotting, and zoom (+pan).

I could adapt for example:

lib/matplotlib/backends/backend_tkagg.py

but it seems quite involved. Is there some simple thing, that would

“just work” for me, that I could start adapting for the web gui? I

would imagine that show() would launch a web server and tell the user

to go to localhost:8080 or something and then the gui would be in the

browser. The browser can even be opened automatically.

Ondrej


ThinkGeek and WIRED’s GeekDad team up for the Ultimate

GeekDad Father’s Day Giveaway. ONE MASSIVE PRIZE to the

lucky parental unit. See the prize list and enter to win:

http://p.sf.net/sfu/thinkgeek-promo


Matplotlib-devel mailing list

Matplotlib-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


ThinkGeek and WIRED’s GeekDad team up for the Ultimate

GeekDad Father’s Day Giveaway. ONE MASSIVE PRIZE to the

lucky parental unit. See the prize list and enter to win:

http://p.sf.net/sfu/thinkgeek-promo


Matplotlib-devel mailing list

Matplotlib-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Hi William,

···

On Wed, Jun 16, 2010 at 4:33 PM, william ratcliff <william.ratcliff@...149...> wrote:

I have a student here trying to make a webapp for data reduction. To add
interactivity, we've been using the FLOT package, and may later consider
protovis. We had thought about making a javascript backend for MPL, but to
just get something running, we went with FLOT for the time being...We're
using EXTJS as the web framework (it's a bit heavy, but has a rich widget
toolkit and documentation). We use Django on the backend and Orbited to
deal with some communications between the browser and the server (for
example if we get new data from an instrument and want to update it on the
server and update plots that are viewing that data..). Over the next couple
of weeks (with the arrival of another student), we will be working more with
the plotting aspect of the project (adding legends, zooming, etc). Also,
for other parts of the app, we're just using the HTML5 canvas...I'd be happy
to work on making the plotting addons as generic as possible so they can be
used outside of our problem domain. What I'm not sure is whether one wants
to truly use MPL as a backend, or rather to use the MPL philosophy of a
javascript package.

That would be exactly what I could reuse. Is the code available as
opensource somewhere?

Ondrej

If anyone is interested in working on an html5 backend, we have a
prototype here thanks to a GSOC applicant from last year

http://bitbucket.org/sanxiyn/matplotlib-canvas/

JDH

···

On Wed, Jun 16, 2010 at 6:33 PM, william ratcliff <william.ratcliff@...149...> wrote:

I have a student here trying to make a webapp for data reduction. To add
interactivity, we've been using the FLOT package, and may later consider
protovis. We had thought about making a javascript backend for MPL, but to
just get something running, we went with FLOT for the time being...We're
using EXTJS as the web framework (it's a bit heavy, but has a rich widget
toolkit and documentation). We use Django on the backend and Orbited to
deal with some communications between the browser and the server (for
example if we get new data from an instrument and want to update it on the
server and update plots that are viewing that data..). Over the next couple
of weeks (with the arrival of another student), we will be working more with
the plotting aspect of the project (adding legends, zooming, etc). Also,
for other parts of the app, we're just using the HTML5 canvas...I'd be happy
to work on making the plotting addons as generic as possible so they can be
used outside of our problem domain. What I'm not sure is whether one wants
to truly use MPL as a backend, or rather to use the MPL philosophy of a
javascript package.

I’ll take a look–but how do you handle interaction? Does it end up having to communicate back to the server?

···

On Thu, Jun 17, 2010 at 2:09 AM, John Hunter <jdh2358@…149…> wrote:

On Wed, Jun 16, 2010 at 6:33 PM, william ratcliff > <william.ratcliff@…149…> wrote:

I have a student here trying to make a webapp for data reduction. To add

interactivity, we’ve been using the FLOT package, and may later consider

protovis. We had thought about making a javascript backend for MPL, but to

just get something running, we went with FLOT for the time being…We’re

using EXTJS as the web framework (it’s a bit heavy, but has a rich widget

toolkit and documentation). We use Django on the backend and Orbited to

deal with some communications between the browser and the server (for

example if we get new data from an instrument and want to update it on the

server and update plots that are viewing that data…). Over the next couple

of weeks (with the arrival of another student), we will be working more with

the plotting aspect of the project (adding legends, zooming, etc). Also,

for other parts of the app, we’re just using the HTML5 canvas…I’d be happy

to work on making the plotting addons as generic as possible so they can be

used outside of our problem domain. What I’m not sure is whether one wants

to truly use MPL as a backend, or rather to use the MPL philosophy of a

javascript package.

If anyone is interested in working on an html5 backend, we have a

prototype here thanks to a GSOC applicant from last year

http://bitbucket.org/sanxiyn/matplotlib-canvas/

JDH

Hi Andrew!

Hi Ondrej,

If I was in your shoes, the first thing I'd do is emit your data to plot
as a json object and then plot that data using javascript with one of
the libraries you've listed. Then, after gaining some familiarity with

Thanks for the encouraging email. So I have code up a simple
prototype, using exactly the approach you suggested. Examples +
screenshot available at:

(just scroll down with your browser, github nicely renders the README.rst).

Python->json->javascript I'd think about how such an MPL backend might
work. A usecase I could imagine is some Django app that uses MPL to plot
stuff into a javascript canvas element complete with zooming and so on.

Yes, I use django and instead of mpl, I use the flotr library, that
does zooming+plotting automatically.

I think there are a lot of open questions in this domain... For example,
presumably one doesn't want the server involved when the client browser
zooms. But then if you implement something that allows the client
browser to zoom without the server MPL process, you're no longer using
the normal MPL callback system. So, interactivity would probably be

Yes, in fact, I am not using MPL at all.

different than in the traditional backends.

You could also start with the svg backend, as browsers do render svg.

I wonder what to do now. I think I'll just emulate the MPL api, that's
easy. Anyway, I can work finally.

Thanks for the help!

Ondrej

···

On Wed, Jun 16, 2010 at 3:45 PM, Andrew Straw <strawman@...36...> wrote: