From an answer given here Gnuplot 3d time animation from data file I changed it a bit adding a filedata 2, now the problem is i have a filedata with
column1 column2 column3 column4
time x y z
0 54 89 787
0.15 90 676 345
0.70 4593 34 387
3.78 59 37 904
and so on with other time positions data (actually in my .dat file I didn't write time x y z ,only the values).
What I'd like to do is to take column 1 values and put its values in place of .j in 'time'.j.
Is there a way to do it?
# define fixed axis-ranges
set xrange [-1:1]
set yrange [0:20]
set zrange [-1:1]
# filename and n=number of lines of your data
filedata = 'data.dat'
n = system(sprintf('cat %s | wc -l', filedata))
do for [j=1:n] {
set title 'time '.j
splot filedata1 u 2:3:4 every ::1::j w l lw 2, \
filedata1 u 2:3:4 every ::j::j w p pt 7 ps 2,\
filedata2 u 2:3:4 every ::1::j w l lw 2, \
filedata2 u 2:3:4 every ::j::j w p pt 7 ps 2
}
Actually as of now I don't know how to put it to work.
To summarize what I've understood from your question:
Comments:
stats(checkhelp stats). With this gnuplot-only and platform-independent, unlike yourn = system(sprintf('cat %s | wc -l', filedata))0, e.g.every ::0::j. But since you have a headerline this line will not be plotted because it is text data.with labels. With this you can plot the value from column 1 somewhere as label, here at x,y,z... u (7):(10):(10) ....Data:
SO74583831_1.datSO74583831_2.datScript:
Result: