Re: [matplotlib-devel] Interpolation in a triangular mesh (tri.Triangulation)

2012-11-16 Thread Ian Thomas
On 15 November 2012 21:25, Chris Barker  wrote:

> On Wed, Nov 14, 2012 at 1:50 AM, Ian Thomas  wrote:
>
> > I think the code used to determine which triangle contains a certain
> point
> > should be factored out into its own TriFinder class,
>
> +1 -- this is a generally useful feature. In fact, it would be nice if
> a lot of this were in a pacakge that deals with triangular meshes,
> apart from MPL altogether (a scikit maybe?)
>

I hadn't considered any wider interest in it.  From a selfish matplotlib
point of view, even if it was in say a scikit, we wouldn't want to add an
external dependency to the scikit so we would still need a copy of the
source code within matplotlib anyway, just to do our interpolation for
plotting purposes.  The situation would be just like the delaunay code
which exists in a scikit but we include it in the mpl source code to avoid
the external dependency.

Once it is in mpl it is available for other projects to use if they wish,
subject to the BSD-style license.  There would be a question of who is
responsible for maintaining it as I don't particularly want to spread
myself thinly on other open source projects when there are a lot of
additions to mpl that I would like to do.  There would be the danger for
the other project of the reverse situation of our delaunay example, where
we have code that needs improvement but it is essentially unmaintained,
causing problems for users and embarrassment for developers.

> I have a C++ TriFinder class
> > that I could modify to work within matplotlib, and it is O(log N) so
> should
> > be faster than your version for typical use cases.
>
> What algorithm does this use? Is the code open source and/or availabel
> for other projects?
>
> I'm working on a package for working with unstructured grids in
> general, and also have a use for "what triangle is this point in" code
> for other purposes -- and I havne't found a fast, robust code for this
> yet.
>

It is code I have written recently based on the trapezoidal map algorithm
from the book 'Computational Geometry: Algorithms and Applications' by M.
de Berg et al.  It currently exists only on my main linux box, but it will
be open source within mpl for others to use as mentioned above (subject to
acceptance by the mpl developers of course).  It is an excellent book that
I wholeheartedly recommend to anyone with a passing interest in
computational geometry.  The algorithm itself looks painful initially (as
do many of the algorithms in the book) but it reduces to a surprisingly
small amount of code.

For well-formed triangulations (i.e. no duplicate points, no zero area
triangles and no overlapping triangles) the algorithm is 'sufficiently'
robust.  It is not completely robust in the sense of Shewchuk's robust
predicates, but is designed quite cleverly (or luckily) to avoid many of
the pitfalls that occur in naive point-in-triangle tests.  For example, a
naive implementation of a point-in-triangle test for a point on or very
near the common edge of two adjacent triangles might return true for both
triangles (which is usually fine), or false for both (which is
catastrophic).  The trapezoidal map avoids these problems by reducing the
test to a single point-line test which is therefore guaranteed to return
just one of the two triangles.  It is possible to think of a situation that
causes the algorithm to fail at a triangle which has such a small area that
the slopes of two of the sides are within the machine precision of each
other, but it is also possible to use the triangle connectivity to check
for and resolve this problem.  I haven't done so yet and need to consider
the tradeoff of effort required vs potential gain.

Someone who required guaranteed robustness could use Shewchuk's point-line
test with the algorithm.  I would not do this with mpl however, as the
correctness of the point-line test depends a lot on computer architecture
and compiler flags.  This would get out of date quickly and would need keen
monitoring by someone with knowledge of and interest in the area, plus
access to a lot of different computer architectures and OSes.  I fail on
all of those counts!


> >> particularly as only a few days ago I committed to writing a triangular
> grid
> >> interpolator for quad grids
>
> what is a triangular interpolator for quad grids? sounds useful, too.


That was poor English from me.  I meant interpolating from a triangular
grid *to* a quad grid, typically to make use of the wide range of quad grid
plotting functions like contour, pcolor, etc.

Ian
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Matplotlib-devel mailing 

Re: [matplotlib-devel] Interpolation in a triangular mesh (tri.Triangulation)

2012-11-16 Thread Ian Thomas
On 16 November 2012 05:14, Damon McDougall wrote:

> >> I have a C++ TriFinder class
> >> that I could modify to work within matplotlib, and it is O(log N) so
> should
> >> be faster than your version for typical use cases.
> >
> > What algorithm does this use? Is the code open source and/or availabel
> > for other projects?
>
> I'm pretty sure there is an O(log n) algorithm in the Numerical
> Recipes book. It requires you to construct the triangulation in a
> specific way (this allows one to set up a tree data structure of
> triangles nicely). There may be others that I am not aware of though.
>

I think this is the standard method used for point-in-triangulation tests
for delaunay triangulations, as the search structure is created as the
triangulation is built.  We need to support non-delaunay triangulations
that are specified by the user, which requires a different approach.

Ian
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] tick_params direction 'inout'

2012-11-16 Thread Mike Kaufman
On 11/15/12 2:54 PM, Paul Ivanov wrote:
> On Wed, Nov 14, 2012 at 7:37 PM, Mike Kaufman 
> I just found that *direction* accepts 'inout' as well, which
> does indeed place the tick on both sides of the spine. So the
> documentation should be updated to reflect this.
>
>
> Thanks for the report, Mike, here's a PR for the patch:
> https://github.com/matplotlib/matplotlib/pull/1503
>
> If it were me, I'd allow 'both' to work as well.
>
>
> I'm amenable to that, just not sure if that counts as a new feature and
> should go into master, or a bugfix and go into v1.2.x.
>
> I can add this functionality to #1503 if that makes sense to go to v1.2.x

Thanks Paul,

One is a doc fix, the other requires changing code (inside axis.py?). So 
best practice probably argues that 'both', if acceptable, should really 
only go into master.

That said, I think the 'both' change only requires a change to a pair of 
conditionals...

M

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] tick_params direction 'inout'

2012-11-16 Thread Benjamin Root
On Fri, Nov 16, 2012 at 7:44 AM, Mike Kaufman  wrote:

> On 11/15/12 2:54 PM, Paul Ivanov wrote:
> > On Wed, Nov 14, 2012 at 7:37 PM, Mike Kaufman 
> >
> > I just found that *direction* accepts 'inout' as well, which
> > does indeed place the tick on both sides of the spine. So the
> > documentation should be updated to reflect this.
> >
> >
> > Thanks for the report, Mike, here's a PR for the patch:
> > https://github.com/matplotlib/matplotlib/pull/1503
> >
> > If it were me, I'd allow 'both' to work as well.
> >
> >
> > I'm amenable to that, just not sure if that counts as a new feature and
> > should go into master, or a bugfix and go into v1.2.x.
> >
> > I can add this functionality to #1503 if that makes sense to go to v1.2.x
>
> Thanks Paul,
>
> One is a doc fix, the other requires changing code (inside axis.py?). So
> best practice probably argues that 'both', if acceptable, should really
> only go into master.
>
> That said, I think the 'both' change only requires a change to a pair of
> conditionals...
>
> M
>
>
I agree with the fact that implementing "both" to mean the same as "inout"
should go into master only.

Ben Root
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] RFC: boxplot_enhanced & paired_stats

2012-11-16 Thread Yaroslav Halchenko
I just found some code (http://www.onerussian.com/tmp/plots.py and
pasted below for review/feedback) laying around which I wrote around
matplotlib for plotting primarily pair-wise stats results.  Here is a
demonstration:
http://nbviewer.ipython.org/url/www.onerussian.com/tmp/run_plots.ipynb

I wonder if there is a need/place for it in matplotlib and what changes would
you advise. Sorry for the lack of documentation -- I guess I have not finished
it at that point (scipy dependency can easily be dropped, used only for
standard error function iirc):

#!/usr/bin/python
#emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; 
indent-tabs-mode: nil -*- 
#ex: set sts=4 ts=4 sw=4 noet:
#- =+- Python script -+= -
"""
 @file  paired-plots.py
 @date  Fri Jan 13 11:48:00 2012
 @brief


  Yaroslav HalchenkoDartmouth
  web: http://www.onerussian.com  College
  e-mail:  [email protected]  ICQ#: 60653192

 DESCRIPTION (NOTES):

 COPYRIGHT: Yaroslav Halchenko 2012

 LICENSE: MIT

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
"""
#-\/--

__author__ = 'Yaroslav Halchenko'
__revision__ = '$Revision: $'
__date__ = '$Date:  $'
__copyright__ = 'Copyright (c) 2012 Yaroslav Halchenko'
__license__ = 'MIT'


import numpy as np
import pylab as pl
import scipy.stats as ss

def plot_boxplot_enhanced(
v,
contrast_labels=None,
condition_labels=None,
ccolors=['y', 'b'],
rand_offsets=None,
grid=True,
xticks_rotation=0,
**bp_kwargs):

width = bp_kwargs.get('width', 0.5)
pl.boxplot(v, **bp_kwargs)

if v.ndim < 2: v = v[:, None]
ncol = v.shape[1]

eff = np.mean(v, axis=0)  # effect sizes
sem = ss.sem(v, axis=0)

if rand_offsets is None:
rand_offsets = np.random.randn(len(v)) * 0.02

pl.plot((np.arange(ncol) + 1)[:, None] + rand_offsets,
v.T, '.', color='k', markerfacecolor='k')
for i in range(ncol):
lw = 2
pl.plot([1 - width/2. + i, 1+i],
[0, 0],
'--', color=ccolors[0], linewidth=lw) # first condition
pl.plot([1+i, 1 + width/2. +i],
[eff[i]]*2,
'--', color=ccolors[1], linewidth=lw)

# place ste
pl.errorbar(i+1 + 1.1*width/2.,
eff[i],
sem[i],
elinewidth=2, linewidth=0,
color='r', ecolor='r')

if contrast_labels and not i:# only for the first 
one
pl.text(1 - 1.1*width/2 + i, 0.1, contrast_labels[0],
verticalalignment='bottom',
horizontalalignment='right')
pl.text(1 + 1.2*width/2 + i, eff[i], contrast_labels[1],
verticalalignment='bottom', horizontalalignment='left')
ax = pl.gca()
if condition_labels:
ax.set_xticklabels(condition_labels, rotation=xticks_rotation)
else:
# hide it
ax.axes.xaxis.set_visible(False)

if grid:
ax.grid()
return ax


def plot_paired_stats(
v0, v1, contrast_labels,
condition_labels=None,
style=['barplot_effect',
   'boxplot_raw',
   'boxplot_effect'],
ccolors=['y', 'g'],
xticks_rotation=0,
grid=False,
fig=None,
bottom_adjust=None,
bp_kwargs={}):

if isinstance(style, str):
style = [style]

nplots = len(style) # how many subplots will be needed

# assure having 2nd dimension
if v0.ndim < 2: v0 = v0[:, None]
if v1.ndim < 2: v1 = v1[:, None]
assert(v0.shape == v1.shape)

ncol = v0.shape[1]
v10 = (v1 - v0) # differences
mv0 = np.mean(v0, axis=0)   # means
mv1 = np.mean(v1, axis=0)

eff = np.mean(v10, axis=0)  # e

Re: [matplotlib-devel] RFC: boxplot_enhanced & paired_stats

2012-11-16 Thread Skipper Seabold
On Fri, Nov 16, 2012 at 10:19 AM, Yaroslav Halchenko  
wrote:
> I just found some code (http://www.onerussian.com/tmp/plots.py and
> pasted below for review/feedback) laying around which I wrote around
> matplotlib for plotting primarily pair-wise stats results.  Here is a
> demonstration:
> http://nbviewer.ipython.org/url/www.onerussian.com/tmp/run_plots.ipynb
>
> I wonder if there is a need/place for it in matplotlib and what changes would
> you advise. Sorry for the lack of documentation -- I guess I have not finished
> it at that point (scipy dependency can easily be dropped, used only for
> standard error function iirc):
>

Looks nice. We'd certainly be interesting in including it in
statsmodels/graphics if there isn't sufficient interest here and/or
you'd like to keep the scipy dependency. ;)

Skipper

> #!/usr/bin/python
> #emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; 
> indent-tabs-mode: nil -*-
> #ex: set sts=4 ts=4 sw=4 noet:
> #- =+- Python script -+= -
> """
>  @file  paired-plots.py
>  @date  Fri Jan 13 11:48:00 2012
>  @brief
>
>
>   Yaroslav HalchenkoDartmouth
>   web: http://www.onerussian.com  College
>   e-mail:  [email protected]  ICQ#: 60653192
>
>  DESCRIPTION (NOTES):
>
>  COPYRIGHT: Yaroslav Halchenko 2012
>
>  LICENSE: MIT
>
>   Permission is hereby granted, free of charge, to any person obtaining a copy
>   of this software and associated documentation files (the "Software"), to 
> deal
>   in the Software without restriction, including without limitation the rights
>   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
>   copies of the Software, and to permit persons to whom the Software is
>   furnished to do so, subject to the following conditions:
>
>   The above copyright notice and this permission notice shall be included in
>   all copies or substantial portions of the Software.
>
>   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
>   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
>   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
> FROM,
>   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
>   THE SOFTWARE.
> """
> #-\/--
>
> __author__ = 'Yaroslav Halchenko'
> __revision__ = '$Revision: $'
> __date__ = '$Date:  $'
> __copyright__ = 'Copyright (c) 2012 Yaroslav Halchenko'
> __license__ = 'MIT'
>
>
> import numpy as np
> import pylab as pl
> import scipy.stats as ss
>
> def plot_boxplot_enhanced(
> v,
> contrast_labels=None,
> condition_labels=None,
> ccolors=['y', 'b'],
> rand_offsets=None,
> grid=True,
> xticks_rotation=0,
> **bp_kwargs):
>
> width = bp_kwargs.get('width', 0.5)
> pl.boxplot(v, **bp_kwargs)
>
> if v.ndim < 2: v = v[:, None]
> ncol = v.shape[1]
>
> eff = np.mean(v, axis=0)  # effect sizes
> sem = ss.sem(v, axis=0)
>
> if rand_offsets is None:
> rand_offsets = np.random.randn(len(v)) * 0.02
>
> pl.plot((np.arange(ncol) + 1)[:, None] + rand_offsets,
> v.T, '.', color='k', markerfacecolor='k')
> for i in range(ncol):
> lw = 2
> pl.plot([1 - width/2. + i, 1+i],
> [0, 0],
> '--', color=ccolors[0], linewidth=lw) # first condition
> pl.plot([1+i, 1 + width/2. +i],
> [eff[i]]*2,
> '--', color=ccolors[1], linewidth=lw)
>
> # place ste
> pl.errorbar(i+1 + 1.1*width/2.,
> eff[i],
> sem[i],
> elinewidth=2, linewidth=0,
> color='r', ecolor='r')
>
> if contrast_labels and not i:# only for the first 
> one
> pl.text(1 - 1.1*width/2 + i, 0.1, contrast_labels[0],
> verticalalignment='bottom',
> horizontalalignment='right')
> pl.text(1 + 1.2*width/2 + i, eff[i], contrast_labels[1],
> verticalalignment='bottom', horizontalalignment='left')
> ax = pl.gca()
> if condition_labels:
> ax.set_xticklabels(condition_labels, rotation=xticks_rotation)
> else:
> # hide it
> ax.axes.xaxis.set_visible(False)
>
> if grid:
> ax.grid()
> return ax
>
>
> def plot_paired_stats(
> v0, v1, contrast_labels,
> condition_labels=None,
> style=['barplot_effect',
>'boxplot_raw',
>'boxplot_effect'],
> ccolors=['y', 'g'],
> xticks_rotation=0,
> grid=False,
> fig=None,
> bottom_adjust=None,

Re: [matplotlib-devel] RFC: boxplot_enhanced & paired_stats

2012-11-16 Thread Paul Hobson
On Fri, Nov 16, 2012 at 7:58 AM, Skipper Seabold wrote:

> On Fri, Nov 16, 2012 at 10:19 AM, Yaroslav Halchenko 
> wrote:
> > I just found some code (http://www.onerussian.com/tmp/plots.py and
> > pasted below for review/feedback) laying around which I wrote around
> > matplotlib for plotting primarily pair-wise stats results.  Here is a
> > demonstration:
> > http://nbviewer.ipython.org/url/www.onerussian.com/tmp/run_plots.ipynb
> >
> > I wonder if there is a need/place for it in matplotlib and what changes
> would
> > you advise. Sorry for the lack of documentation -- I guess I have not
> finished
> > it at that point (scipy dependency can easily be dropped, used only for
> > standard error function iirc):
> >
>
> Looks nice. We'd certainly be interesting in including it in
> statsmodels/graphics if there isn't sufficient interest here and/or
> you'd like to keep the scipy dependency. ;)
>
> Skipper


I was going to suggest either the same thing or adding it to pandas. I
think statsmodels if the better fit, though. I also noticed scipy is only
used for scipy.stats.sem -- so it might be easy enough to loose the scipy
dependency. Just a thought.
-paul
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] OpenGL backend with Galry

2012-11-16 Thread Fernando Perez
Hi Cyrille,

On Thu, Nov 15, 2012 at 11:24 AM, Cyrille Rossant
 wrote:
> I am developing a high-performance interactive visualization package in
> Python based on PyOpenGL (http://rossant.github.com/galry/). It is primarily
> meant to be used as a framework for developing complex interactive GUIs (in
> QT) that deal with very large amounts of data (tens of millions of points).
> But it may also be used, like matplotlib, as a high-level interactive
> library to plot and visualize data.

quick question: how easy/feasible is WebGL integration?  I ask b/c
we're starting to get the necessary machinery for easy WebGL
visualization in the ipython notebook, see e.g.:

http://www.flickr.com/photos/47156828@N06/8183294725

so bringing galry to the notebook with minimal code duplication would
be great.  I just mention it now in case it helps you make design
decisions as you go along.

Cheers,

f

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] OpenGL backend with Galry

2012-11-16 Thread Cyrille Rossant
Hi Fernando,

It would be really great if galry could be integrated in the
notebook indeed. Is the code of this demo available somewhere, so that I
can get an idea about how this integration works?

In theory, galry should be compatible with WebGL because one of the main
components of galry is a shader code generator that can produce OpenGL
ES-compatible GLSL code. Apart from that, I suppose you have some way of
making Javascript and Python communicate? The interaction system of Galry,
which is based on QT but with an abstraction layer, could then be plugged
to Javascript somehow... Anyway, if I could take a look to the code of this
demo, I should be able to evaluate how complicated this integration would
be.

Cyrille

2012/11/16 Fernando Perez 

> Hi Cyrille,
>
> On Thu, Nov 15, 2012 at 11:24 AM, Cyrille Rossant
>  wrote:
> > I am developing a high-performance interactive visualization package in
> > Python based on PyOpenGL (http://rossant.github.com/galry/). It is
> primarily
> > meant to be used as a framework for developing complex interactive GUIs
> (in
> > QT) that deal with very large amounts of data (tens of millions of
> points).
> > But it may also be used, like matplotlib, as a high-level interactive
> > library to plot and visualize data.
>
> quick question: how easy/feasible is WebGL integration?  I ask b/c
> we're starting to get the necessary machinery for easy WebGL
> visualization in the ipython notebook, see e.g.:
>
> http://www.flickr.com/photos/47156828@N06/8183294725
>
> so bringing galry to the notebook with minimal code duplication would
> be great.  I just mention it now in case it helps you make design
> decisions as you go along.
>
> Cheers,
>
> f
>
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] OpenGL backend with Galry

2012-11-16 Thread Fernando Perez
Hi Cyrille,

On Fri, Nov 16, 2012 at 1:00 PM, Cyrille Rossant
 wrote:
> Hi Fernando,
>
> It would be really great if galry could be integrated in the notebook
> indeed. Is the code of this demo available somewhere, so that I can get an
> idea about how this integration works?
>
> In theory, galry should be compatible with WebGL because one of the main
> components of galry is a shader code generator that can produce OpenGL
> ES-compatible GLSL code. Apart from that, I suppose you have some way of
> making Javascript and Python communicate? The interaction system of Galry,
> which is based on QT but with an abstraction layer, could then be plugged to
> Javascript somehow... Anyway, if I could take a look to the code of this
> demo, I should be able to evaluate how complicated this integration would
> be.

Yup, it's a bit of a hack right now b/c you need to merge several
branches and tools that are still in review, but it's not too bad.

You need to start from this branch:

https://github.com/ellisonbg/ipython/tree/jsonhandlers

and then grab this repo:

https://github.com/ipython/jsplugins

I would start by testing the d3graph plugin and verify that you can do
what I show here (watch ~ 40 seconds):

http://www.youtube.com/watch?v=F4rFuIb1Ie4&t=40m0s

That should give you the basics.  Then the webgl visualizer example is here:

https://github.com/RishiRamraj/seepymol

Cheers,

f

--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel