← Back to team overview

yade-users team mailing list archive

Re: [Question #678500]: plot 2 figures

 

Question #678500 on Yade changed:
https://answers.launchpad.net/yade/+question/678500

    Status: Answered => Open

hafsa is still having a problem:
hi Jan ,
i tried the both and after condition (O.iter>= 1e4) the the curve ( kinetic and pos_z)  becomes transparent . 


def plotAddData():
   #ekin=kineticEnergy()/n
   plot.addData(i=O.iter,e=log(kineticEnergy()/n), **O.energy)
   # oscillation 
   if O.iter >=0.8*1e4: 
       O.engines=O.engines+[HarmonicMotionEngine(A=[0,0,1.], f=[0,0,2.6], fi = [0.0,0.0,0.0],ids =Cylinder)]
       # save in file
       pos_z=O.bodies[0].state.pos[2]
       plot.addData(i=O.iter,pos_z=O.bodies[0].state.pos[2])

#plot.plots={'i':['e']+O.energy.keys()}
#plot.plots = {'i ':('e',None,'pos_z')}
plot.plots={'i':['pos_z',],'i ':['e']+O.energy.keys()}      
plot.plot()
plot.live=True

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.