【问题标题】:How can I use antialiasing in Gnuplot to make an gif?如何在 Gnuplot 中使用抗锯齿来制作 gif?
【发布时间】:2018-03-01 22:48:51
【问题描述】:

例如,我需要在这段代码中添加什么来激活抗锯齿功能?

set terminal gif animate delay 5 size 400, 250
set output "example.gif"

a = 0

do for [i=1:100] {
a = a + 0.1
plot sin(x + a)
}

我需要更改 gnuplot 文件夹的一些文件吗?我使用的是 5.2 Windows 版本的 gnuplot。

【问题讨论】:

    标签: animation gnuplot gif animated-gif antialiasing


    【解决方案1】:

    使用具有抗锯齿功能的终端 pngcairo 创建单独的 png 文件:

    set terminal pngcairo size 400, 250
    
    a = 0
    
    do for [i=1:100] {
    set output sprintf("%.3d.png",i)
    plot sin(x + a)
    a = a + 0.1
    }
    

    然后你可以组装一个gif文件,例如用ImageMagickconvert

    convert -delay 5 -loop 0 *.png animation.gif
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-18
      • 2023-04-07
      • 2010-12-19
      • 1970-01-01
      • 2013-04-19
      • 1970-01-01
      • 2013-01-02
      • 2021-05-20
      相关资源
      最近更新 更多