可以在gnuplot中完成以下操作吗?如果有,怎么样?
我在表格中有时间与位置(x,y,z)的数据,其中t,x,y,z为标题.
我想知道我是否能以某种方式绘制粒子在预定义空间内的相同时间与位置,并在每个时间步之后暂停; 这样我就可以看到粒子随时间的变化.我还想知道我是否可以从前一个位置到当前位置绘制一条连续线,这样我才能真正看到它过去的轨迹.
示例数据:
让我们说预定义的空间是一个10x10x10的盒子,我的粒子在3秒内有以下位置.
t x y z
0 1 2 3
1 2 3 4
2 3 4 5
3 4 5 6
Run Code Online (Sandbox Code Playgroud)
我如何看到粒子的跟踪!我的想法是,如果我可以暂停一点点的每一个步骤的情节,它看起来像一个动画,我可以使用屏幕捕获软件捕获...
除此之外,这些数据也可以使用gnuplot进行动画处理
如果gnuplot不是正确的工具,是否还有其他软件更有效和/或更优雅地做到这一点!?
任何帮助,将不胜感激!
谢谢.
创建文件main.gp并运行gnuplot main.gp或load "main.gp"在gnuplot的外壳.输出是在point.gif.文档
http://www.gnuplot.info/documentation.html
您也可以输入helpgnuplot shell.
main.gp
set term gif animate delay 30 size 400, 400
set output "point.gif"
do for [n=1:4] {
splot [0:7][0:7][0:7] "data" u 2:3:4 every :::::n w lp t sprintf("n=%i", n)
}
Run Code Online (Sandbox Code Playgroud)
数据
t x y z
0 1 2 3
1 2 3 4
2 3 4 5
3 4 5 6
Run Code Online (Sandbox Code Playgroud)

编辑:我转向迭代,因为@mgilson建议.
| 归档时间: |
|
| 查看次数: |
7890 次 |
| 最近记录: |