Ping Yeh wrote:
> Hi,
>
> I checked the manual and briefly searched the mailing list but did not
> find this... Is there a table-like data type with rows as events and
> columns as attributes that I can make plots with? This is called
> "ntuple" in the high energy physics community.
>
> Let me illustrate with an example. Assume that an event consists of 3
> attributes (x, y, t). With N events we have a table of N x 3 data
> items. Assume that the data items are read from a file "xyt.dat".
>
> d = Table("xyt.dat")
> d.plot("x", "t") # make a plot of x vs. t, N points are drawn
> d.plot("x") # make a histogram plot of x, N entries in the histogram
> d.plot("x", "y < 3") # make a histogram plot of x where y is less than 3.
> # that is, only {x[i] | y[i] < 3} are used to make the
> histogram
>
> If there is no existing modules for this I'll go ahead write one. :)
There is nothing quite like this. As a starting point, though, you
should become familiar with the ability of numpy to handle record
arrays; your table data type sounds like a numpy record array.
Matplotlib is a plotting library built on the numpy N-dimensional array
library.
Eric
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users