set the format for plot.savedatatxt

Asked by nobody on 2019-10-16

Hi All,

I'm wondering if we can set the format for the output txt files by using the plot.savedadatxt command.

For example, if we use these two lines
plot.addData(x = x_position,y = y_position,z = z_position,r = radius)
plot.saveDataTxt('data.txt')

if I want the output file format likes this:
# y z r x

not like # r x y z.

Is there any way to set this?

best,
yong

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
2019-10-16
Last query:
2019-10-16
Last reply:
2019-10-16
Best Robert Caulk (rcaulk) said : #1

Try:

plot.saveDataTxt('data.txt', vars=('r','x','y','z'))

Jan Stránský (honzik) said : #2

Try:

plot.saveDataTxt('data.txt', vars=('y','z','r','x'))

nobody (nobody01) said : #3

Thanks Robert Caulk, that solved my question.

nobody (nobody01) said : #4

Also,
Thanks, Jan,
your answer is also correct.