多图 gnuplot 中的 GIF 术语动画
GIF term animation in gnuplot with multiplot
我在 gnuplot 中遇到了 gif 终端。我读到它会跟踪每个 plot 命令,直到遇到第二个 set out
命令。
最近,需要一个动画多图 - 有没有办法用 gif 终端实现这个?
我基本上需要的是一个由三个图组成的矩阵,每个图都是动画的,在我可以指定的某个网格中。
在正常的单图环境中,每个 plot
命令都会创建一个新框架。在多图环境中,每个 set multiplot
- unset multiplot
对都会创建一个新框架,其中可以包含多个 plot
命令,如下例所示:
set terminal gif animate delay 100
set output "multiplot_animated.gif"
n = 50
dphi = 2*pi/n
do for [i=0:(n-1)] {
phi = i*dphi
set multiplot layout 2,1
plot sin(x+phi)
plot cos(x+phi)
unset multiplot
}
这是结果。跳过 delay 100
(或更改数字)以更改动画速度。
我在 gnuplot 中遇到了 gif 终端。我读到它会跟踪每个 plot 命令,直到遇到第二个 set out
命令。
最近,需要一个动画多图 - 有没有办法用 gif 终端实现这个?
我基本上需要的是一个由三个图组成的矩阵,每个图都是动画的,在我可以指定的某个网格中。
在正常的单图环境中,每个 plot
命令都会创建一个新框架。在多图环境中,每个 set multiplot
- unset multiplot
对都会创建一个新框架,其中可以包含多个 plot
命令,如下例所示:
set terminal gif animate delay 100
set output "multiplot_animated.gif"
n = 50
dphi = 2*pi/n
do for [i=0:(n-1)] {
phi = i*dphi
set multiplot layout 2,1
plot sin(x+phi)
plot cos(x+phi)
unset multiplot
}
这是结果。跳过 delay 100
(或更改数字)以更改动画速度。