yade and terminal

Asked by HaodingXu

Dear staff,

I am learning about yade and when I tried the example2: https://yade-dem.org/doc/tutorial-examples.html#gravity-deposition
I am suing ubuntu 22.04 and yade 2022.01a with python 3.10.4
It shows the error like:
yade.plot: creating fake plot, since there are no y-data yet
WARNING:matplotlib.legend:No artists with labels found to put in legend. Note that artists whose label start with an underscore are ignored when legend() is called with no argument.

however, I found I can seave the code as name.py and run on terminal with: yade name.py

could you please give me some ab\dvice?

Best wishes,
Haoding

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
Karol Brzezinski (kbrzezinski) said :
#1

Hi Haoding,

when you create a function in 'live' terminal Yade doesn't see it. It is always better tonrun scripts. However, you can make it work in the terminal. After creating functions run the line:
globals().update(locals())

Cheers,
Karol

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Outside the actually distinct behaviours when live-typing commands in a YADE terminal or running these commands through a script, your message:

"yade.plot: creating fake plot, since there are no y-data yet"

does not seem a problematic error to me. Maybe more a warning popping up because no datas have been saved until now (maybe because no iteration have been executed) in one of your workflow

If you ask for plot.data (+ ENTER..) in terminal, you can check if this (Python dictionnary) is empty or not

Can you help with this problem?

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

To post a message you must log in.