set the format for plot.savedatatxt

Asked by ytang

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:
Last query:
Last reply:
Revision history for this message
Best Robert Caulk (rcaulk) said :
#1

Try:

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

Revision history for this message
Jan Stránský (honzik) said :
#2

Try:

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

Revision history for this message
ytang (ytang116) said :
#3

Thanks Robert Caulk, that solved my question.

Revision history for this message
ytang (ytang116) said :
#4

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