spreadsheet data visualisation app

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

spreadsheet data visualisation app

Timmie
Administrator
Hello,
is there any application that I can use view numpy arrays in a tabular /
spreadsheet like manner?

Although I know that there may be large arrays which make it difficult for such
a application to work properly, this can sometimes be desireable for validating
calculation results. Especially when working interactively (i. e. using Ipython).

I imagine something like:

arr = np.arrange(0,10)

array.sheet(arr)

=> similar to pylab.show() an application like the spreadsheet on
http://zetcode.com/wxpython/skeletons/ could then pop up visualising my array.

The only app I can currently imagine to do such tasks would be Resolver One:
http://www.resolversystems.com/products/resolver-one/ but that application is
based on IronPython.

Kind regards,
Timmie

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: spreadsheet data visualisation app

Gary Pajer-2
I think I've done this using the Enthought Tool Suite TraitsGUI package, but my memory is a little fuzzy.   

If I get a chance, I'll see if I can find what I did back then.  In any event, Traits and TraitsGUI have a lot of features, so you might have to browse the docs a bit to find it.

On Mon, Nov 3, 2008 at 10:45 AM, Timmie <[hidden email]> wrote:
Hello,
is there any application that I can use view numpy arrays in a tabular /
spreadsheet like manner?

Although I know that there may be large arrays which make it difficult for such
a application to work properly, this can sometimes be desireable for validating
calculation results. Especially when working interactively (i. e. using Ipython).

I imagine something like:

arr = np.arrange(0,10)

array.sheet(arr)

=> similar to pylab.show() an application like the spreadsheet on
http://zetcode.com/wxpython/skeletons/ could then pop up visualising my array.

The only app I can currently imagine to do such tasks would be Resolver One:
http://www.resolversystems.com/products/resolver-one/ but that application is
based on IronPython.

Kind regards,
Timmie

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: spreadsheet data visualisation app

John Hunter-4
On Thu, Nov 6, 2008 at 10:15 AM, Gary Pajer <[hidden email]> wrote:

>> is there any application that I can use view numpy arrays in a tabular /
>> spreadsheet like manner?

matplotlib has a gtk toolkit for an editable record array view.  One
could easily adapt the pattern to other toolkits

  In[1:]: import matplotlib.mlab as mlab

  In [2]: r = mlab.csv2rec('data/intc.csv')

  In [3]: import mpl_toolkits.gtktools as gtktools

  In [4]: gtktools.rec2gtk(r)
  Out[4]: <SortedStringsScrolledWindow object (GtkScrolledWindow) at 0x8c98e14>

Screenshot is attached -- click on a cell to edit...

JDH

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user

gtkview.png (55K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: spreadsheet data visualisation app

David Joyner-4
John Hunter wrote:

> On Thu, Nov 6, 2008 at 10:15 AM, Gary Pajer <[hidden email]> wrote:
>
>  
>>> is there any application that I can use view numpy arrays in a tabular /
>>> spreadsheet like manner?
>>>      
>
> matplotlib has a gtk toolkit for an editable record array view.  One
> could easily adapt the pattern to other toolkits
>
>   In[1:]: import matplotlib.mlab as mlab
>
>   In [2]: r = mlab.csv2rec('data/intc.csv')
>
>   In [3]: import mpl_toolkits.gtktools as gtktools
>  

Where do you find this gtk module? It doesn't seem to be installed by
default.
Can it be installed using apt-get? I tried googling but got no useful info.
I'm using the python and matplotlib installed via apt-get on hardy heron
ubuntu.

>   In [4]: gtktools.rec2gtk(r)
>   Out[4]: <SortedStringsScrolledWindow object (GtkScrolledWindow) at 0x8c98e14>
>
> Screenshot is attached -- click on a cell to edit...
>
> JDH
>  
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> SciPy-user mailing list
> [hidden email]
> http://projects.scipy.org/mailman/listinfo/scipy-user
>  


--
Prof. David Joyner
[hidden email]
Some USNA-specific information in this email may be FOUO.

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: spreadsheet data visualisation app

John Hunter-4
On Fri, Nov 7, 2008 at 7:11 AM, David Joyner <[hidden email]> wrote:

> Where do you find this gtk module? It doesn't seem to be installed by
> default.
> Can it be installed using apt-get? I tried googling but got no useful info.
> I'm using the python and matplotlib installed via apt-get on hardy heron
> ubuntu.

It should be in any version of matplotlib (python-matplotlib in ubuntu
I think) since 0.98 -- you can check your mpl version with

http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#obtaining-matplotlib-version

JDH
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: spreadsheet data visualisation app

David Warde-Farley-2
In reply to this post by David Joyner-4
On 7-Nov-08, at 8:11 AM, David Joyner wrote:

> Where do you find this gtk module? It doesn't seem to be installed by
> default.
> Can it be installed using apt-get? I tried googling but got no  
> useful info.
> I'm using the python and matplotlib installed via apt-get on hardy  
> heron
> ubuntu.

Presumably you mean the 'gtk' module in Python rather than the  
matplotlib backend...  Try:

        apt-get install python-gtk2 python-gtk2-dev

You should then be able to use

        import gtk

without error at the python prompt. Hopefully the matplotlib package  
for Ubuntu has the GTK backend built in and they just forgot to tag  
the dependency; if not, you may be stuck compiling from source (which  
admittedly is not hard).

David
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: spreadsheet data visualisation app

John Hunter-4
On Sat, Nov 8, 2008 at 6:53 AM, David Warde-Farley <[hidden email]> wrote:

> without error at the python prompt. Hopefully the matplotlib package
> for Ubuntu has the GTK backend built in and they just forgot to tag
> the dependency; if not, you may be stuck compiling from source (which
> admittedly is not hard).

Actually, you do not necessarily  need to use a gtk* backend to use
this feature.  The gtktools are just things I use when embedding
matplotlib in gtkapps, but the rec2gtk view is not dependent on any
mpl backend as it simply creates a gtk treeeview in a gtk scroll
window from a rec array.  So yes, he will need to install pygtk, but
shouldn't have any problems if he simply wants to use rec2gtk from the
python shell or embedded in a gtk app.

There is one caveat to this -- if you want to use this feature
interactively from the ipython shell and use pylab at the same time,
then you will need a gtk backend.  Eg in the example I posted, when I
did rec2gtk from the ipython shell, that only works properly if
ipython is in gthread mode, which it will be if you are running -pylab
with a gtk* backend.

JDH
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: spreadsheet data visualisation app

David Joyner-4
In reply to this post by Timmie
Unfortunately, the intrepid ibex ubuntu version of
matplotlib seems to be too old, though pygtk and
friends is easy using apt-get. I actually prefer
to use matplotloib within Sage (as in,
www.sagemath.org), but there pygtk is not easy for
me to install. If your comment below says gtktools
is not needed, then I don't understand how to
use matplotlib to display a csv file. Is there a different
command you had in mind?



---- Original message ----

>Date: Sat, 8 Nov 2008 07:07:26 -0600
>From: "John Hunter" <[hidden email]>  
>Subject: Re: [SciPy-user] spreadsheet data visualisation app  
>To: "SciPy Users List" <[hidden email]>
>
>On Sat, Nov 8, 2008 at 6:53 AM, David Warde-Farley <[hidden email]> wrote:
>
>> without error at the python prompt. Hopefully the matplotlib package
>> for Ubuntu has the GTK backend built in and they just forgot to tag
>> the dependency; if not, you may be stuck compiling from source (which
>> admittedly is not hard).
>
>Actually, you do not necessarily  need to use a gtk* backend to use
>this feature.  The gtktools are just things I use when embedding
>matplotlib in gtkapps, but the rec2gtk view is not dependent on any
>mpl backend as it simply creates a gtk treeeview in a gtk scroll
>window from a rec array.  So yes, he will need to install pygtk, but
>shouldn't have any problems if he simply wants to use rec2gtk from the
>python shell or embedded in a gtk app.
>
>There is one caveat to this -- if you want to use this feature
>interactively from the ipython shell and use pylab at the same time,
>then you will need a gtk backend.  Eg in the example I posted, when I
>did rec2gtk from the ipython shell, that only works properly if
>ipython is in gthread mode, which it will be if you are running -pylab
>with a gtk* backend.
>
>JDH
>_______________________________________________
>SciPy-user mailing list
>[hidden email]
>http://projects.scipy.org/mailman/listinfo/scipy-user
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user