【问题标题】:GIF term animation in gnuplot with multiplot带有多图的gnuplot中的GIF术语动画
【发布时间】:2017-07-15 03:49:18
【问题描述】:

我在 gnuplot 中遇到了 gif 终端。我读到它会跟踪每个绘图命令,直到遇到第二个 set out 命令。 最近,出现了对动画多情节的需求——有没有办法用 gif 终端实现这一点? 我需要的是一个由三个图组成的矩阵,每个图都有动画,在我可以指定的某个网格中。

【问题讨论】:

标签: animation gnuplot gif


【解决方案1】:

在正常的单图环境中,每个plot 命令都会创建一个新框架。在 multiplot 环境中,每个 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(或更改数字)以更改动画速度。

【讨论】:

  • 我一直将 for 循环放在 set 和 unset multiplot 中!谢谢!
猜你喜欢
  • 2014-05-18
  • 2018-06-19
  • 2019-08-11
  • 2014-04-04
  • 2014-04-03
  • 1970-01-01
  • 2013-12-22
  • 2016-08-23
  • 2013-12-17
相关资源
最近更新 更多