具有多个图形的 3d GNUPLOT 动画

3d GNUPLOT Animation With Multiple Graphs

我从

改编了以下代码
filedata = 'Sun_t_v_state.dat'
filedata2 = 'Mercury_v_state.dat'
filedata3 = 'Venus_t_v_state.dat'
filedata4 = 'Earth_t_v_state.dat'
filedata5 = 'Mars_t_v_state.dat'
filedata6 = 'Jupiter_t_v_state.dat'
filedata7 = 'Saturn_t_v_state.dat'
filedata8 = 'Uranus_t_v_state.dat'
filedata9 = 'Neptune_t_v_state.dat'
filedata10 = 'Pluto_t_v_state.dat'
n = 44

set term gif animate
set output 'output.gif'

do for [j=1:n] {
    set title 'time '.j
    splot filedata u 2:3:4 every ::1::j w l lw 2, \
          filedata u 2:3:4 every ::j::j w p pt 7 ps 2
    splot 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
    splot filedata3 u 2:3:4 every ::1::j w l lw 2, \
          filedata3 u 2:3:4 every ::j::j w p pt 7 ps 2
    splot filedata4 u 2:3:4 every ::1::j w l lw 2, \
          filedata4 u 2:3:4 every ::j::j w p pt 7 ps 2
    splot filedata5 u 2:3:4 every ::1::j w l lw 2, \
          filedata5 u 2:3:4 every ::j::j w p pt 7 ps 2
    splot filedata6 u 2:3:4 every ::1::j w l lw 2, \
          filedata6 u 2:3:4 every ::j::j w p pt 7 ps 2
    splot filedata7 u 2:3:4 every ::1::j w l lw 2, \
          filedata7 u 2:3:4 every ::j::j w p pt 7 ps 2
    splot filedata8 u 2:3:4 every ::1::j w l lw 2, \
          filedata8 u 2:3:4 every ::j::j w p pt 7 ps 2
    splot filedata9 u 2:3:4 every ::1::j w l lw 2, \
          filedata9 u 2:3:4 every ::j::j w p pt 7 ps 2
    splot filedata10 u 2:3:4 every ::1::j w l lw 2, \
          filedata10 u 2:3:4 every ::j::j w p pt 7 ps 2
}

但是当我 运行 这样做时,我在 gif 文件中只得到一帧,标记为 'time 1';我需要更改什么才能使其正常工作?

我需要像这样在一个 splot 命令中将其切换为全部:

# define fixed axis-ranges

# filename and n=number of lines of your data 
filedata = 'Sun_t_v_state.dat'
filedata2 = 'Mercury_v_state.dat'
filedata3 = 'Venus_t_v_state.dat'
filedata4 = 'Earth_t_v_state.dat'
filedata5 = 'Mars_t_v_state.dat'
filedata6 = 'Jupiter_t_v_state.dat'
filedata7 = 'Saturn_t_v_state.dat'
filedata8 = 'Uranus_t_v_state.dat'
filedata9 = 'Neptune_t_v_state.dat'
filedata10 = 'Pluto_t_v_state.dat'
n = 44

set term gif animate
set output 'output.gif'

do for [j=1:n] {
    set title 'time '.j
    splot filedata u 2:3:4 every ::1::j w l lw 2, \
          filedata 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, \
          filedata3 u 2:3:4 every ::1::j w l lw 2, \
          filedata3 u 2:3:4 every ::j::j w p pt 7 ps 2, \
          filedata4 u 2:3:4 every ::1::j w l lw 2, \
          filedata4 u 2:3:4 every ::j::j w p pt 7 ps 2, \
          filedata5 u 2:3:4 every ::1::j w l lw 2, \
          filedata5 u 2:3:4 every ::j::j w p pt 7 ps 2, \
          filedata6 u 2:3:4 every ::1::j w l lw 2, \
          filedata6 u 2:3:4 every ::j::j w p pt 7 ps 2, \
          filedata7 u 2:3:4 every ::1::j w l lw 2, \
          filedata7 u 2:3:4 every ::j::j w p pt 7 ps 2, \
          filedata8 u 2:3:4 every ::1::j w l lw 2, \
          filedata8 u 2:3:4 every ::j::j w p pt 7 ps 2, \
          filedata9 u 2:3:4 every ::1::j w l lw 2, \
          filedata9 u 2:3:4 every ::j::j w p pt 7 ps 2, \
          filedata10 u 2:3:4 every ::1::j w l lw 2, \
          filedata10 u 2:3:4 every ::j::j w p pt 7 ps 2   
          }