spreadsheet data visualisation app
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
I think I've done this using the Enthought Tool Suite TraitsGUI package, but my memory is a little fuzzy. http://www.enthought.com/products/open-tool-suite.php 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 <timmichelsen@gmx-topmail.de> 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 SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
On Thu, Nov 6, 2008 at 10:15 AM, Gary Pajer <gary.pajer@gmail.com> 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
John Hunter wrote:
On Thu, Nov 6, 2008 at 10:15 AM, Gary Pajer <gary.pajer@gmail.com> 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 SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
-- Prof. David Joyner wdj@usna.edu Some USNA-specific information in this email may be FOUO.
On Fri, Nov 7, 2008 at 7:11 AM, David Joyner <wdj@usna.edu> 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-mat... JDH
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
On Sat, Nov 8, 2008 at 6:53 AM, David Warde-Farley <dwf@cs.toronto.edu> 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
participants (5)
-
David Joyner
-
David Warde-Farley
-
Gary Pajer
-
John Hunter
-
Timmie