Hi,

I agree, shell with inline plot is a different issue. I mainly coded  
it as a proof a concept and because I find it useful for my own needs.

The figure call is quite different from the figure call of matplotlib,  
only the name is common.
The idea was to be able to describe a configuration of arrays with a  
minimum amount of code.

figure(Z) -> plot Z
figure([Z1,Z2]) -> plot Z1,Z2 side by side
figure([[Z1,Z2], [Z3,Z4]]) -> plot Z1,Z2 side by side and below, Z3,Z4  
side by side

You can optionally indicate that an array spans several rows or columns:

figure([[Z1,'-'],
             [Z3,Z4]]) -> plot Z1 on two columns and below, Z3,Z4 side by side
figure([[Z1,Z2],
             ['|', Z4]]) -> plot Z1 on two rows,  then Z2 on first line and  
Z4 on second line.


I looked at the thread you're talking about and it was the reason in  
the first place that I investigated pyglet.
My approach is a bit different since I use a texture and a single quad  
to render it, it makes things quite fast. The mapping from a float  
array to a texture data is pretty efficient using numpy interface and  
it allows me to continuously update texture data (just try modifying  
the array from within the console).


Nicolas



On 3 Apr, 2009, at 17:12 , Eric Bruning wrote:

> The idea of a shell with inline plots is a fascinating one - I like
> the minimalism and directness of being able to plot data like this.
> And the speed of OpenGL is obviously attractive.
>
> Is the figure() call syntax different from the existing syntax for
> figure()? I think there's a usage pattern ingrained in my head that
> says 'figure => new window,' and any change to the call syntax for
> figure would seem to open up a lot of room for confusion.
>
> It seems that the backend and the shell might be separate issues? My
> view of the backends is that they only deal with knowing how to draw
> artists, and are separate from the process of creating those artists
> through an interactive shell.
>
> The following old thread is also relevant, which you may have  
> already seen:
> http://www.nabble.com/opengl-backend-td19192625.html
>
> Thanks,
> Eric B
>
>
> On Fri, Apr 3, 2009 at 7:17 AM, Nicolas Rougier
> <nicolas.roug...@loria.fr> wrote:
>>
>> Hello,
>>
>> While looking at possible solutions for a matplotlib OpenGL backend,
>> I've been experimenting with pyglet (that has no dependencies) and  
>> coded
>> a terminal with embedded 2d arrays display.
>>
>> Sources & screenshots are available at:
>> http://www.loria.fr/~rougier/glnumpy.html
>>
>> Since pyglet seems mature enough, I would like to know if anyone
>> interested in helping writing the OpenGL backend (using pyglet) ?
>>
>>
>> Nicolas
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Matplotlib-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>>


------------------------------------------------------------------------------
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to