[matplotlib-devel] web gui

2010-06-16 Thread Ondrej Certik
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


Re: [matplotlib-devel] web gui

2010-06-16 Thread Eric Firing
On 06/16/2010 12:06 PM, 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 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

>
> 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


Re: [matplotlib-devel] web gui

2010-06-16 Thread Andrew Straw
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


Re: [matplotlib-devel] web gui

2010-06-16 Thread william ratcliff
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  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
>
--
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


Re: [matplotlib-devel] web gui

2010-06-16 Thread Ondrej Certik
Hi William,

On Wed, Jun 16, 2010 at 4:33 PM, william ratcliff
 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

--
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


Re: [matplotlib-devel] web gui

2010-06-16 Thread Ondrej Certik
On Wed, Jun 16, 2010 at 5:13 PM, william ratcliff
 wrote:
> Do you want the whole code base?

Well, if you can send me something to start from, that'd be awesome. I
have put my initial code here:

http://github.com/certik/jsplot

it uses django + raphael. Now I need to write a simple MPL like api,
and also implement zoom somehow.
I think I'll make it work for my purposes soon hopefully.

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


Re: [matplotlib-devel] web gui

2010-06-16 Thread Ondrej Certik
On Wed, Jun 16, 2010 at 6:01 PM, Ondrej Certik  wrote:
> On Wed, Jun 16, 2010 at 5:13 PM, william ratcliff
>  wrote:
>> Do you want the whole code base?
>
> Well, if you can send me something to start from, that'd be awesome. I
> have put my initial code here:
>
> http://github.com/certik/jsplot
>
> it uses django + raphael. Now I need to write a simple MPL like api,
> and also implement zoom somehow.
> I think I'll make it work for my purposes soon hopefully.

These guys already implemented zoom in the flotr library:

http://phenxdesign.net/projects/flotr/examples/prototype/mouse-zoom-preview.html

So maybe I'll just use that. In FF3 it's terribly slow though...

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


Re: [matplotlib-devel] web gui

2010-06-16 Thread william ratcliff
www.reflectometry.org/flot/examples has some examples with zooming for flot.
  These seem ok for speed using firefox...How many data points?

William

On Wed, Jun 16, 2010 at 9:07 PM, Ondrej Certik  wrote:

> On Wed, Jun 16, 2010 at 6:01 PM, Ondrej Certik  wrote:
> > On Wed, Jun 16, 2010 at 5:13 PM, william ratcliff
> >  wrote:
> >> Do you want the whole code base?
> >
> > Well, if you can send me something to start from, that'd be awesome. I
> > have put my initial code here:
> >
> > http://github.com/certik/jsplot
> >
> > it uses django + raphael. Now I need to write a simple MPL like api,
> > and also implement zoom somehow.
> > I think I'll make it work for my purposes soon hopefully.
>
> These guys already implemented zoom in the flotr library:
>
>
> http://phenxdesign.net/projects/flotr/examples/prototype/mouse-zoom-preview.html
>
> So maybe I'll just use that. In FF3 it's terribly slow though...
>
> 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


Re: [matplotlib-devel] web gui

2010-06-16 Thread John Hunter
On Wed, Jun 16, 2010 at 6:33 PM, william ratcliff
 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

--
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