Re: [Matplotlib-users] From list of objects to plotting

2007-05-07 Thread John Hunter
On 5/6/07, Jouni K. Seppänen <[EMAIL PROTECTED]> wrote: > Tommy Grav <[EMAIL PROTECTED]> writes: > > > I would now like to plot a vs e for all the obj objects in nlist. > > how do I do that? I tried > > > > plot(nlist[:].a,nlist[:].e,'ko') > > You have a list of objects that have attributes named a

Re: [Matplotlib-users] From list of objects to plotting

2007-05-06 Thread Jouni K . Seppänen
Tommy Grav <[EMAIL PROTECTED]> writes: > I would now like to plot a vs e for all the obj objects in nlist. > how do I do that? I tried > > plot(nlist[:].a,nlist[:].e,'ko') You have a list of objects that have attributes named a and e; these are not attributes of the list. Try plot([x.a for x i

Re: [Matplotlib-users] From list of objects to plotting

2007-05-06 Thread Matthias Michler
Hello Tommy, I would like to do such convertings, too, but I think there is no such fast way in python. I'm using the 'for statement' to iterate over a list of objects and save their properties into a new list. best regards, Matthias On Friday 04 May 2007 17:54, Tommy Grav wrote: > I have som