Some questions about plot.plots

Asked by Cloud on 2018-11-08

Hi all,

Recently, i find a function utils.psd()(https://yade-dem.org/doc/yade.utils.html?highlight=utils.psd#yade.utils.psd)
that is useful for my simulation. Sphere size may change as simulation test is going on, and i need to observe the evolution of the sphere size distribution curve throughout the simulation, so i try to use the following method learned from the doc to plot the curve :

def psdMonitor():
    binsSizes, binsProc, binsSumCum =utils.psd(bins=30, mass=True, mask=-1)

O.engines=O.engines+[PyRunner(commad='psdMonitor()', iterPeriod=100)]

plot.addData(binsSize)
plot.plots={'binsSizes':('binsProc')}
plot.plot()

But then i found the return value of utils.psd() are three lists (for example binsSizes is list of bin's size), which may be not suitable for plot.plots. So is there a similar way to plot.plots to show the curve i need? just like plot.plots={'i' : ('unbalanced')} that can plot evolution of the value need to observe. Or there are some other better ways to solve my problem?

Thanks!!

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Bruno Chareyre
Solved:
2018-11-12
Last query:
2018-11-12
Last reply:
2018-11-08

> is there a similar way to plot.plots to show the curve i need?

Hi,
It seems you don't want a "curve" but a surface instead - if I understand correctly (a function of size and time).
No, plot.plots=... was not designed for surfaces.
You'll have to learn how to plot with python it seems.
Regards
Bruno

Cloud (strife-cloud) said : #2

Thanks Bruno Chareyre, that solved my question.