post2d.plot: scaling of the arrows ?

Asked by Rioual

Hello,

I use yade.post2d.plot() to represent graphically the velocity field of
 my particles in my set up as in
https://yade-dem.org/doc/yade.post2d.html?highlight=uniax%20post

My question concerns the scaling of the length of the arrows on the figure:
How is it related to the numerical value of the velocity of the beads ?
is it eventually rescaled with respect to the maximum value ?
This is a big issue for me as i want to compare the velocity field diagrams for different
 configurations of my set up.

Thanks very much for your help,

Vincent

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi,

From the source code [1], the behavior seems to be the one of [2] (? hoping I did not step into a trap of different Python modules). There seems indeed to be an automatic modification of the length which could trouble you. Behavior could be different though, try maybe to pass additional arguments e.g.

post2d.plot([...], scale = aConstantValueThatSuitsYou)

[1] https://gitlab.com/yade-dev/trunk/-/blob/master/py/post2d.py#L301 for most recent YADE version
[2] https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.quiver.html

Can you help with this problem?

Provide an answer of your own, or ask Rioual for more information if necessary.

To post a message you must log in.