Re: [Matplotlib-users] Handling data and creating arrays

2008-06-13 Thread washakie
Okay?? That does seem to work... I guess I'd better go read up on index_tricks.py ? Thanks. Alan G Isaac wrote: > x1,y1,x2,y2 =np.random.random((4,20)) data = dict(var1=(x1,y1), var2=(x2,y2)) a = np.c_[[d for xy in data.values() for d in xy]] a > array([[ 0.66613738, 0.

Re: [Matplotlib-users] Handling data and creating arrays

2008-06-13 Thread Chris.Barker
washakie wrote: > DataDict={var1:(x1,y1),var2:(x2,y2),var3:(x3,y3)} ; where the x and y's are > generally lists. You might be able to use numpy record arrays (recarray). There are lots of good reasons to use numpy arrays other than plotting. -Chris -- Christopher Barker, Ph.D. Oceanographe

Re: [Matplotlib-users] Handling data and creating arrays

2008-06-13 Thread Alan G Isaac
On Fri, 13 Jun 2008, washakie apparently wrote: > DataDict={var1:(x1,y1),var2:(x2,y2),var3:(x3,y3)} ; where > the x and y's are generally lists. > Now that's nice, because I can cycle through the DataDict.keys() to batch > plot, etc. But how can I convert the whole dict into > a single array (