Question #222563 on Yade changed: https://answers.launchpad.net/yade/+question/222563
Jan Stránský proposed the following answer: I supposed that indents were missing from copy-paste process.. the function plotAddData work and did not result in SyntaxError, but I don't know yet how to solve the NameError.. Jan 2013/2/28 Christian Jakob <[email protected]> > Question #222563 on Yade changed: > https://answers.launchpad.net/yade/+question/222563 > > Christian Jakob posted a new comment: > hi, > > from your script i see some problems. > i am not sure, if this solves all errors ... > > for 1. : > > wrong: > > def plotAddData(): > pos = b.state.pos > plot.addData( i=O.iter, x=pos[0], y=pos[1], z=pos[2] ) > > correct: > > def plotAddData(): > pos = b.state.pos > plot.addData( i=O.iter, x=pos[0], y=pos[1], z=pos[2] ) > > -> you forgot indents > > > for 2. : > > wrong: > > plot.addData( i=O.iter, x=pos[0], y=pos[1], z=pos[2] > ,nIntrs=len(b.intrs() > > correct: > > plot.addData( i=O.iter, x=pos[0], y=pos[1], z=pos[2] > ,nIntrs=len(b.intrs()) > > -> you forgot ")" > > > regards, > > christian > > -- > You received this question notification because you are a member of > yade-users, which is an answer contact for Yade. > > _______________________________________________ > Mailing list: https://launchpad.net/~yade-users > Post to : [email protected] > Unsubscribe : https://launchpad.net/~yade-users > More help : https://help.launchpad.net/ListHelp > -- You received this question notification because you are a member of yade-users, which is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

