yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #18999
Re: [Question #678500]: plot 2 figures
Question #678500 on Yade changed:
https://answers.launchpad.net/yade/+question/678500
Status: Open => Answered
Jan Stránský proposed the following answer:
For next time, MWE = Minimal Working Example [1].
in your case, the plot becomes transparent because there are not
continuous data to plot (plot .addData adds NaN in case some data are
missing):
> plot.addData(i=O.iter,e=log(kineticEnergy()/n), **O.energy) # 1st plot.addData, adding NaN for pos_z
> if O.iter >=0.8*1e4:
> plot.addData(i=O.iter,pos_z=O.bodies[0].state.pos[2]) # 2nd plot.addData, adding NaN for e
solution:
if O.iter > ...:
plot.addData(i=...,e=...,pos_z=...
else:
plot.addData(i=...,e=...)
Jan
[1] https://yade-dem.org/wiki/Howtoask
--
You received this question notification because your team yade-users is
an answer contact for Yade.